This forum has been archived. All content is frozen. Please use KDE Discuss instead.

GTK program menus show monochrome square text background

Tags: None
(comma "," separated)
User avatar
remus
Registered Member
Posts
26
Karma
0
OS
I have set my GTK2 and GTK3 programs to use Oxygen -theme, but menus either don't use it or they show ugly monochrome text background. Colour of those blocks depend my colour settings. I use Linux Mint KDE 13 (based on ubuntu 12.04) 4.9.5. I have GTK based DE's also installed (gnome3, cinnamon, xfce, lxde). I suspect some of those have broken something. Menus used to work but turn this way at some point. I have almost identical setting in my laptop but only KDE there and version 14 of mint and no issues. How could I get rid of those text backgrounds without having to reinstall whole system? I can change the GTK theme to something else but they all seem use default colours. I have set programs to use my colour settings also outside KDE4 programs in KDE settings but it doesn't seem to have effect for these applications unless I use Oxygen theme.

Programs like Firefox, Thunderbird, LibreOffice show menus as single colour like they would use some other theme than Oxygen in both computers. Don't know if this can be changed but it's not that big deal. The widget items are shown correctly. They also use right colour settings if I change the GTK theme.

Last edited by remus on Thu Jan 24, 2013 9:12 am, edited 1 time in total.
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
Can you try moving away your *.gtkrc files in your home dir (move, not delete) and see if the problem persists? I don't think it's an Oxygen issue (can't reproduce here).


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar
remus
Registered Member
Posts
26
Karma
0
OS
I renamed gtk* files I have in ~/ (.gtkrc-2.0, .gtkrc-2.0-kde4) but it didn't seem to have an effect.
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
Can you also post some screenshots? It might help in identifying the problem. Use a pastebin service, then use the "Img" bbcode to post the images.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar
remus
Registered Member
Posts
26
Karma
0
OS
einar wrote:Can you also post some screenshots?

Ok. First example how GTK-Oxygen should look like (using dark colours, this program is GTK app CherryTree):
Image

Some GTK-programs show it like this (Firefox, LibreOffice, etc) :
Image
It's not that bad but background looks like simple black instead of Oxygen one.

And this is how it looks in other programs (this example is Rhythmbox):
Image

If I change theme again those some programs succeed using them (this example is theme BlackFate, program CherryTree):
Image

...while others fail (Rhythmbox):
Image

I have tried to change GTK3 theme with kde-gtk-config or editing ~/.config/gtk-3.0/settings.ini but that doesn't have an effect. The problem might be that Mint13 doesn't come with kde-gtk-config by default but I've installed it later. GTK3 themes appear in the GUI list and are updated to settings.ini -file but they aren't working for some reason.
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
Does this work OK with another GTK+ theme? Just to rule out Oxygen out of the picture.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar
remus
Registered Member
Posts
26
Karma
0
OS
I think those are all GTK2 programs and themes that work and GTK3 programs and themes that don't. GTK3 programs will use the default theme if I have set different GTK2 and 3 themes. Only if they are the same will also GTK3 programs use it. If I change them both to Oxygen GTK3 applications show that monochrome text backgrounds. I managed to install couple GTK3 themes that seem to work (most of installations fail due unment dependencies etc).
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
Can you try executing a GTK+ application from the terminal when having Oxygen and see if there are errors printed?


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar
remus
Registered Member
Posts
26
Karma
0
OS
einar wrote:Can you try executing a GTK+ application from the terminal when having Oxygen and see if there are errors printed?


Yes there seem be some. For Cairo-Dock:
warning : (/build/buildd/cairo-dock-3.1.2/src/gldit/cairo-dock-opengl.c:cairo_dock_initialize_opengl_backend:208)
couldn't find an appropriate visual, trying to get one without Stencil buffer
(it may cause some little deterioration in the rendering) ...

Rhythmbox:
(rhythmbox:26394): Gtk-CRITICAL **: _gtk_css_section_to_string: assertion `section != NULL' failed
(rhythmbox:26394): Gtk-WARNING **: Theme parsing error: (null): Unknown value 'GTK_SHADOW_NONE' for enum type 'GtkShadowType'
bmichael
Registered Member
Posts
3
Karma
0
remus wrote:I have set my GTK2 and GTK3 programs to use Oxygen-theme, but menus either don't use it or they show ugly monochrome text background. Colour of those blocks depend my colour settings. I use Linux Mint KDE 13 (based on ubuntu 12.04) 4.9.5. I have GTK based DE's also installed (gnome3, cinnamon, xfce, lxde). I suspect some of those have broken something. Menus used to work but turn this way at some point. I have almost identical setting in my laptop but only KDE there and version 14 of mint and no issues. How could I get rid of those text backgrounds without having to reinstall whole system? I can change the GTK theme to something else but they all seem use default colours. I have set programs to use my colour settings also outside KDE4 programs in KDE settings but it doesn't seem to have effect for these applications unless I use Oxygen theme.

Programs like Firefox, Thunderbird, LibreOffice show menus as single colour like they would use some other theme than Oxygen in both computers. Don't know if this can be changed but it's not that big deal. The widget items are shown correctly. They also use right colour settings if I change the GTK theme.


xD xD "Ugly" monochrome? How dare you! :D All of the themes have default color schemes I reckon.

Last edited by bmichael on Sun May 05, 2013 10:10 pm, edited 3 times in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
@remus: From what I can tell, it looks like the version of Gtk the style was meant to be used with is not the version of Gtk the application is using.
You may want to check your environment variables to ensure that Gtk2 and Gtk3 are using different configuration files, then configure those by hand to use the appropriate Oxygen Gtk style depending on the version of Gtk.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
vootey
Registered Member
Posts
54
Karma
0
OS
It seems I've got the same problem here with gtk3 apps. Normally the theme looks fine, but when it comes to menu-buttons they look like the ones in remus' third picture.
Any working solution found yet?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
@vootey: Have you checked the Gtk configuration environment variables, as well as for the presence of the related configuration files?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
vootey
Registered Member
Posts
54
Karma
0
OS
bcooksley wrote:@vootey: Have you checked the Gtk configuration environment variables, as well as for the presence of the related configuration files?

I assume this is the related config file.. ?
Code: Select all
$ cat ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-font-name=Sans Serif  9
gtk-theme-name=oxygen-gtk
gtk-icon-theme-name=KFaenza
gtk-fallback-icon-theme=mono
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-menu-images=1
gtk-button-images=1


Which GTK configuration environment variables should I have checked?
Code: Select all
$ env | grep -i gtk
GTK2_RC_FILES=/home/vootey/.gtkrc-2.0
GTK_RC_FILES=/etc/gtk/gtkrc:/home/vootey/.gtkrc:/home/vootey/.kde4/share/config/gtkrc
CONFIG_PROTECT=/usr/share/gnupg/qualified.txt /usr/share/config /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The GTK_RC_FILES and GTK2_RC_FILES environment variables are both relevant here, as is ~/.config/gtk-3.0/settings.ini. In this case it appears Gtk 3 applications are supposed to be using Oxygen Gtk as their style. Can you check to see if anything similar has been set for Gtk 2 applications?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]