After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 123207 - renaming file is difficult when using high contrast theme
renaming file is difficult when using high contrast theme
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: [obsolete] Backgrounds Emblems and Themes
2.4.x
Other Linux
: Normal major
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
AP2
Depends on: 130565
Blocks:
 
 
Reported: 2003-09-25 15:17 UTC by Patrick Wade
Modified: 2008-12-12 03:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the theme problem while renaming (2.07 KB, patch)
2004-01-05 12:34 UTC, Narayana Pattipati
none Details | Review

Description Patrick Wade 2003-09-25 15:17:37 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.
Comment 1 Patrick Wade 2003-10-15 13:54:14 UTC
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.
Comment 2 Patrick Wade 2003-12-11 10:51:48 UTC
As of 11 Dec 2003, this black-on-black (with black caret too) problem
is still apparent.
Comment 3 Narayana Pattipati 2003-12-18 09:03:50 UTC
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.
Comment 4 Narayana Pattipati 2004-01-05 12:30:43 UTC
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. 
Comment 5 Narayana Pattipati 2004-01-05 12:34:22 UTC
Created attachment 22929 [details] [review]
Patch to fix the theme problem while renaming
Comment 6 Narayana Pattipati 2004-01-05 13:44:49 UTC
Raised bug#130565 against gnome-themes for gtkrc changes.
Comment 7 Alexander Larsson 2004-01-19 10:25:31 UTC
Looks good. I commited this to HEAD.