Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  GTK colour problem with KDE dark theme  (Read 6580 times)

Offline sunrat

  • User
  • Posts: 406
GTK colour problem with KDE dark theme
« on: 2015/03/01, 01:44:00 »
I have an issue with GTK programs. When I use dark colours in KDE, GTK submenus have light grey text on white background which is unreadable. I have some gtk engines and config packages, but none solved the issue. This is December install.
Code: [Select]
root@brain:/home/roger# dpkg -l|grep gtk
ii  gtk-theme-config                            1.0-1                                  amd64        simple interface to change GTK+ themes
ii  gtk2-engines-oxygen:amd64                   1.4.6-1                                amd64        Oxygen widget theme for GTK+-based applications
ii  gtk3-engines-oxygen:amd64                   1.4.1-1                                amd64        Oxygen widget theme for GTK3-based applications
ii  kde-config-gtk-style                        3:2.2.1-1                              amd64        KDE configuration module for GTK+ 2.x and GTK+ 3.x styles selection
ii  libcanberra-gtk0:amd64                      0.30-2.1                               amd64        GTK+ helper for playing widget event sounds with libcanberra
ii  libdbusmenu-gtk4:amd64                      12.10.2-1                              amd64        library for passing menus over DBus - GTK+ version
rc  libgpod4-nogtk:amd64                        0.8.3-1.1                              amd64        library to read and write songs to an iPod
ii  libgtk-3-0:amd64                            3.14.5-1                               amd64        GTK+ graphical user interface library
ii  libgtk-3-bin                                3.14.5-1                               amd64        programs for the GTK+ graphical user interface library
ii  libgtk-3-common                             3.14.5-1                               all          common files for the GTK+ graphical user interface library
ii  libgtk2.0-0:amd64                           2.24.25-1                              amd64        GTK+ graphical user interface library
ii  libgtk2.0-bin                               2.24.25-1                              amd64        programs for the GTK+ graphical user interface library
ii  libgtk2.0-common                            2.24.25-1                              all          common files for the GTK+ graphical user interface library
ii  libgtkglext1                                1.2.0-3.2                              amd64        OpenGL Extension to GTK+ (shared libraries)
ii  libgtkmm-2.4-1c2a:amd64                     1:2.24.4-1.1                           amd64        C++ wrappers for GTK+ (shared libraries)
ii  libgtkspell0                                2.0.16-1.1                             amd64        a spell-checking addon for GTK's TextView widget
ii  libjavascriptcoregtk-1.0-0:amd64            2.4.8-1                                amd64        JavaScript engine library from WebKitGTK+
ii  libjavascriptcoregtk-3.0-0:amd64            2.4.8-1                                amd64        JavaScript engine library from WebKitGTK+
ii  libwebkitgtk-1.0-0:amd64                    2.4.8-1                                amd64        Web content engine library for GTK+
ii  libwebkitgtk-1.0-common                     2.4.8-1                                all          Web content engine library for GTK+ - data files
ii  libwebkitgtk-3.0-0:amd64                    2.4.8-1                                amd64        Web content engine library for GTK+
ii  libwebkitgtk-3.0-common                     2.4.8-1                                all          Web content engine library for GTK+ - data files
ii  libwxgtk2.8-0:amd64                         2.8.12.1+dfsg2-2                       amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
ii  libwxgtk3.0-0:amd64                         3.0.2-1+b1                             amd64        wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime)
ii  lightdm-gtk-greeter                         1.8.5-2                                amd64        simple display manager (GTK+ greeter)
ii  pinentry-gtk2                               0.8.3-2                                amd64        GTK+-2-based PIN or pass-phrase entry dialog for GnuPG
ii  python-gtk2                                 2.24.0-4                               amd64        Python bindings for the GTK+ widget set
ii  siduction-settings-lightdm-gtk-december     2014.07.18                             all          Settings for installed siduction lightdm


Millie

  • Guest
Re: GTK colour problem with KDE dark theme
« Reply #1 on: 2015/03/01, 04:47:40 »

I'm not familiar with KDE, but I have Siduction LXDE and Xfce and experienced the exact same problem. I found that the Adwaita theme is causing the problems, so I deleted the Adwaita folder from usr/share/themes and it solved my problem with dark GTKs. I'm guessing KDE has that same theme. If you have it, rename it or make a backup of the folder and delete it. Apply the theme you want, reboot and see what happens.


~ It worked for me.


Edit: Here's a screenshot. Gimp was the one that suffered the most until I deleted the Adwaita theme. Now it renders perfectly.

http://www.imagebam.com/image/0f84c6393873575
« Last Edit: 2015/03/01, 05:24:25 by Millie »

Offline sunrat

  • User
  • Posts: 406
Re: GTK colour problem with KDE dark theme
« Reply #2 on: 2015/03/01, 17:09:37 »
Wow, that worked! Thank you so much.

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Re: GTK colour problem with KDE dark theme
« Reply #3 on: 2015/03/01, 18:05:10 »
Nice, thank you !
Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline sunrat

  • User
  • Posts: 406
Re: GTK colour problem with KDE dark theme
« Reply #4 on: 2015/03/02, 01:43:11 »
It seems very strange that a theme which is not actually being used should cause issues in the currently used theme. :o

Offline der_bud

  • User
  • Posts: 1.072
  • member
Re: GTK colour problem with KDE dark theme
« Reply #5 on: 2015/03/03, 08:24:33 »
It seems very strange that a theme which is not actually being used should cause issues in the currently used theme. :o
Yes, that's strange. From what I've found searching the www there are several people with similar issues, for example ubunteros switching from Radiance theme to Adwaita and back have strange relics of Adwaita. Some of them post that obviously the file ~/.gtkrc-2.0 is not properly rewritten on theme change, so they found a line in it stating
Quote
include "/usr/share/themes/Adwaita/gtk-2.0/gtkrc"
even when Adwaita is not chosen.
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

Offline sunrat

  • User
  • Posts: 406
Re: GTK colour problem with KDE dark theme
« Reply #6 on: 2015/03/03, 10:43:50 »
The plot thickens -
~/.gtkrc-2.0
Code: [Select]
# File created by KDE Gtk Config
# Configs for GTK2 programs

include "/usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc"
include "/etc/gtk-2.0/gtkrc"
style "user-font"
{
    font_name="Droid Sans [unknown] Regular"
}
widget_class "*" style "user-font"
gtk-font-name="Droid Sans [unknown] Regular 10"
gtk-theme-name="oxygen-gtk"
gtk-icon-theme-name="oxygen"
gtk-fallback-icon-theme="oxygen"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1

/etc/gtk-2.0/gtkrc
Code: [Select]
include "/usr/share/themes/Adwaita/gtk-2.0/gtkrc"
gtk-font-name="DejaVu Sans Book 9"
gtk-theme-name="Adwaita"
gtk-icon-theme-name="oxygen"
gtk-fallback-icon-theme="gnome"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1

Definitely a config glitch somewhere.

Offline DeepDayze

  • User
  • Posts: 457
Re: GTK colour problem with KDE dark theme
« Reply #7 on: 2015/03/04, 01:29:15 »
What if you changed that include line to point to the folder of your desired GTK theme?

Offline sunrat

  • User
  • Posts: 406
Re: GTK colour problem with KDE dark theme
« Reply #8 on: 2015/03/04, 03:24:47 »
Removing the Adwaita directory looks like it was a good workaround, but yes, I'd imagine editing the /etc/gtk-2.0/gtkrc file should work. I'm not going to spend any more time on this.
My main concern with the last post was that maybe there is a bug in the package config or installation routine, so thought I would point it out.

Offline DeepDayze

  • User
  • Posts: 457
Re: GTK colour problem with KDE dark theme
« Reply #9 on: 2015/03/04, 03:43:29 »
Removing the Adwaita directory looks like it was a good workaround, but yes, I'd imagine editing the /etc/gtk-2.0/gtkrc file should work. I'm not going to spend any more time on this.
My main concern with the last post was that maybe there is a bug in the package config or installation routine, so thought I would point it out.

Why not file a bug against the gtk theme package?

Offline sunrat

  • User
  • Posts: 406
Re: GTK colour problem with KDE dark theme
« Reply #10 on: 2015/03/04, 16:26:04 »
I may look into that soon, much to busy now. I'm guessing kde-config-gtk-style doesn't write correctly to /etc/gtk-2.0/gtkrc .
It was a long time ago that the problem surfaced and I may have even installed kde-config-gtk-style and/or gtk-theme-config to attempt to correct it.

Offline sunrat

  • User
  • Posts: 406
Re: GTK colour problem with KDE dark theme
« Reply #11 on: 2018/05/07, 18:20:14 »
Three years later and this issue still occasionally rears it's head, this time in the file chooser for Audacious and the sidebar in Zim Desktop Wiki.

Instead of removing the whole Adwaita theme I edited the file /etc/gtk-2.0/gtkrc and it seems ok now. Apparently settings made by kde-config-gtk-style which are saved in ~/.gtkrc-2.0 are not always honoured.
The working file in /etc/gtk-2.0/gtkrc ended up like this:
Code: [Select]
include "/usr/share/themes/Breeze-Dark/gtk-2.0/gtkrc"
gtk-font-name="Noto Sans Regular 10"
gtk-theme-name="Breeze-Dark"
gtk-icon-theme-name="breeze-dark"
gtk-fallback-icon-theme="oxygen"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Re: GTK colour problem with KDE dark theme
« Reply #12 on: 2018/05/07, 21:23:05 »
/etc/gtk-2.0/gtkrc

Code: [Select]
#include "/usr/share/themes/Adwaita/gtk-2.0/gtkrc"
gtk-font-name="DejaVu Sans Book 9"
#gtk-theme-name="Adwaita"
gtk-icon-theme-name="oxygen"
gtk-fallback-icon-theme="gnome"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1

always worked for me  :)

Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline sunrat

  • User
  • Posts: 406
Re: GTK colour problem with KDE dark theme
« Reply #13 on: 2018/05/09, 03:38:45 »
I've had no problems lately (on the most recent siduction install which is about 9 months old now) with the programs that originally spawned this thread such as Gimp and Firefox. It's just occasional programs that are added to default siduction have the issue - most recently Zim Wiki and Audacious.