GNOME Bugzilla – Bug 123207
renaming file is difficult when using high contrast theme
Last modified: 2008-12-12 03:08:18 UTC
Using gnome-2.4 nightly build from 24 September 2003. -logged in as normal user. -accessibility enabled. -Change the Gnome theme to HighContrastLargePrintInverse, ensuring that the controls and icons are HighContrastLargePrintInverse too. -Open a Nautilus window and create a new directory called 'folderX'. -Keynav to the folderX icon. -Press shift-F10 to get the context menu for the folderX directory. -Choose the rename option. -Press the left and right arrow keys and observe that the insertion caret is difficult to locate due to it being black-on-black.
Checking this on a build from 10th October 2003, it appears that the effect has changed (for the worse). Now when renaming a file (via 'F2' key), the editing mode is denoted by the background of the current text turning white. This means that the black caret is now visible when editing the files' name, but the current name of the file (or any text entered in this editing mode) is white-on-white, hence invisible until the user confirms with 'Return' key to exit the editing mode.
As of 11 Dec 2003, this black-on-black (with black caret too) problem is still apparent.
I can confirm this bug on nautilus HEAD based on 18/12/2003. Here are my observations: a) Did gnome-cleanup; Installed nautilus and logged into GNOME. b) Setting HighContrastLargePrintInverse theme, the rename text is appearing in white color on a white background. So the text being entered is not visible. But the cursor is in black color, so its appearing. This is in the Icon View. c) Tried the same rename in List View. In the list view, while renaming, the background is black, text color is white and cursor color is greenish. So text and cursor are always visible. d) Now come back to Icon View and try to rename. The background is black now, text color is white and cursor color is black. So only cursor is not visible now. e) Logged out; did gnome-cleanup and logged in back. The rename behaviour is same as explained in (d). pkill nautilus and try the rename. Behaviour is same as (d) only.
When user selects HighContrastLargePrintInverse or HighContrastInverse themes and starts renaming a folder/file in nautilus-icon-view, the following problems are there: a) The background and cursor colors do not change as per the theme selected. b) The outer rectangle color of the editablelabel does not change as per the theme. Analysis: The widget involved while renaming a folder in nautilus icon view is EelEditableLabel. a) The style_set callback does not have code to set background and cursor colors according to the new theme selected. The realize function has code to set cursor color. But that does not change because, cursor_color property value is not set for EelEditableLabel class in gtkrc files of the themes. (Note that for GtkEntry, this property is set in gtkrc files. That's why gtkentry always has a cursor color according to the theme). b) The outer rectangle color is hardcoded to black. Thats why it does not appear well in inverse themes. Solution: a) Add the code to style_set callback to change background and cursor colors as per the new theme. Also, cursor_color property needs to be added to the themes' gtkrc files. [1] b) Draw the outer rectangle color based on the foreground color of the widget in its current state. [1] Adding cursor_color property to EelEditableLabel class should be done in gnome-themes module. I will raise a new bug against gnome-themes and request Calum to do the necessary changes. For testing purpose, I added the cursor_color property value to gtkrc files and tested. The changes to gtkrc files would be something like: --- HighContrastInverse/gtk-2.0/gtkrc.org Mon Dec 29 15:45:52 2003 +++ HighContrastInverse/gtk-2.0/gtkrc Mon Dec 29 15:46:31 2003 @@ -31,6 +31,8 @@ style "default" GtkTextView::cursor_aspect_ratio = 0.1 GtkEntry::cursor_aspect_ratio = 0.1 NautilusIconContainer::frame_text = 1 + EelEditableLabel::cursor_color = "#00cccc" + EelEditableLabel::cursor_aspect_ratio = 0.1 fg[NORMAL] = "white" text[NORMAL] = "white" I will attach a patch to eel code now.
Created attachment 22929 [details] [review] Patch to fix the theme problem while renaming
Raised bug#130565 against gnome-themes for gtkrc changes.
Looks good. I commited this to HEAD.