LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   On hover to a button changes TEXT color - renders it unreadable (http://www.linuxquestions.org/questions/linux-desktop-74/on-hover-to-a-button-changes-text-color-renders-it-unreadable-902478/)

shadyabhi 09-11-2011 04:46 PM

On hover to a button changes TEXT color - renders it unreadable
 
Without hovering using mouse, a button looks like this http://i.imgur.com/mbSo6.png

After hovering, it looks like this -> http://i.imgur.com/gO4ma.jpg

On hovering on another widget, the bg color also changes and it remains readable. http://i.imgur.com/VdjsR.png

So, the text color changes to almost white one some widgets (without the g color changing).

As far as I guess, its the issue of bg color not changing on few widgets. And this thing (no bg color changing) also occurs at places like "when I hover over a icon in nautilus ( http://i.imgur.com/TiZf7.png )".
I am really having hard time figuring that out. I have tried gnome-color-chooser which seems elaborate but even that doesn't have option to change that.

I am using openbox and that app I shows is a gtk app.

~/.gtkrc-2.0
Code:

# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.

gtk-theme-name="drakfire dream"
gtk-icon-theme-name="crystalsvg"
gtk-font-name="Lucida G 7"
gtk-cursor-theme-name="Oxygen_Black"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"
gtk-xft-rgba="rgb"
gtk-color-scheme="tooltip_fg_color:#ffffff\nlink_color:#DD4814\nbase_color:#ffffff\nselected_fg_color:#bc2db76fb76f\ntext_color:#3C3C3C\nbg_color:#F2F1F0\ntooltip_bg_color:#000000\nselected_bg_color:#f07746\nfg_color:#4c4c4c\n"
include "/home/skr/.gtkrc-2.0.mine"


MrCode 09-12-2011 10:56 AM

Have you tried editing the GTK theme? You should be able to find the gtkrc file either in /usr/share/themes/[theme name], or in ~/.themes/[theme name]. In it, you should find (probably under style "theme-default" or similar) a color line that reads text[PRELIGHT] = "<hexcolor>". Change that color to something darker (it's probably at #ffffff), and it should make the on-mouseover text darker.

If you don't feel like going to that much trouble, you could always use a different GTK theme… :-\

…hope this helps.

shadyabhi 09-12-2011 11:16 PM

So, it was a bad openbox theme. Actually, I was changing theme by editing settings.ini file in ~/gtk-3.0. Due to this, I was not able to change the theme.

But, then later I figured out that the real settings.ini file was in ~/.config/gtk-3.0. I edited it and changed the theme for now.
I will look at what you said and try to solve the issue for that particular theme once I get some time. Thanks :)

MrCode 09-13-2011 07:45 AM

Quote:

later I figured out that the real settings.ini file was in ~/.config/gtk-3.0. I edited it and changed the theme for now.
I will look at what you said and try to solve the issue for that particular theme once I get some time.
Er, if you're using GTK3, then I'm not so sure if what I said above would really apply; I don't know how GTK3 themes are laid out. The color fix I suggested above should apply to GTK2 themes, though. I had assumed you were using GTK2 because you posted your ~/.gtkrc-2.0 instead of a ~/.gtkrc-3.0.

shadyabhi 09-13-2011 11:06 PM

Quote:

Originally Posted by MrCode (Post 4470542)
Er, if you're using GTK3, then I'm not so sure if what I said above would really apply; I don't know how GTK3 themes are laid out. The color fix I suggested above should apply to GTK2 themes, though. I had assumed you were using GTK2 because you posted your ~/.gtkrc-2.0 instead of a ~/.gtkrc-3.0.

I thought evince used gtk2 thats why I posted gtk-2.0. Sorry about that.


All times are GMT -5. The time now is 07:21 PM.