Just to be sure, I also tried to manually set the gtk-theme-name in ~/.gtkrc-2.0 instead of using GNOME's XSettings daemon, and it works fine too. BTW, I also tried various other themes (Clearlooks, Crux, High Contrast, Shiki and various others I had at hand) and they all worked fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have the same problem after upgrading to 1.23. I'm using Arch with KDE 4.10.1 and whatever the default GTK theme is (haven't changed/tweaked anything).
I've build geany from git and updated gtk to 2.24.16. The problem persists.
No styles get applied at all, e.g. tab's close button does not change, in any theme except for Raleigh and LargePrint(magnified Raleigh). Tested everything from gnome-themes-2.32.1. I've used gtk-chtheme to change the theme.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@kudah: OK, I tested gtk-chtheme and I understand what's going on. And it's not Geany's fault. It's just that gtk-chtheme is a crappy thing.
Let me explain. GTK2 theming supports different level of priority, basically the user settings have precedence over the theme's settings. The correct way to set a GTK2 theme is to set the gtk-theme-name setting, so GTK knows which theme to use. However, gtk-chtheme, instead of setting the theme name, it includes the themes in your user's settings, settings which have precedence over Geany's. And then you don't see the settings.
For me it's not a bug in Geany because we cannot do anything better without making it impossible for the user to change our styles (which is the main point of the theming stuff); for me it's just that gtk-chtheme is dumb and includes the style in the user's settings instead of setting the theme name.
So IMO the fix is for you to replace the `inculde "/path/to/theme"` in your ~/.gtkrc-2.0 with a proper `gtk-theme-name "yourtheme"`.
@glanzick could you check your own ~/.gtkrc-2.0 and see how it looks?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
…and I tested under ArchLinux/KDE4 and indeed sees the issue as well.
Apparently the KDE stuff that sets the GTK style can't deal with style priorities; which unfortunately are the only way to leave the possibility to override our styles to the users.
A workaround is to copy $prefix/share/geany/geany.gtkrc to ~/.gtkrc-2.0 (or append its content), and remove the occurrences ":theme" in it (e.g. replace "style:theme" with "style").
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can't reproduce. Since you're on Gentoo, I guess you built it yourself; so how's your umask? Is $prefix/share/geany/geany.gtkrc readable?
It's the same as on github.
If I use Raleigh gtk theme, styles change just fine. Every single other theme doesn't work.
OK. I use Adwaita from gnome-themes-standard 3.4 and still see the colors.
Which themes have you seen not working?
Just to be sure, I also tried to manually set the gtk-theme-name in ~/.gtkrc-2.0 instead of using GNOME's XSettings daemon, and it works fine too. BTW, I also tried various other themes (Clearlooks, Crux, High Contrast, Shiki and various others I had at hand) and they all worked fine.
I have the same problem after upgrading to 1.23. I'm using Arch with KDE 4.10.1 and whatever the default GTK theme is (haven't changed/tweaked anything).
My /usr/share/geany/geany.gtkrc is readable and has:
# document status colors
style "geany-document-status-changed-style" {
fg[NORMAL] = "#ffff00000000"
fg[ACTIVE] = "#ffff00000000"
}
style "geany-document-status-disk-changed-style" {
fg[NORMAL] = "#ffff7fff0000"
fg[ACTIVE] = "#ffff7fff0000"
}
style "geany-document-status-readonly-style" {
fg[NORMAL] = "#00007fff0000"
fg[ACTIVE] = "#00007fff0000"
}
widget "*.geany-document-status-changed" style:theme "geany-document-status-changed-style"
widget "*.geany-document-status-disk-changed" style:theme "geany-document-status-disk-changed-style"
widget "*.geany-document-status-readonly" style:theme "geany-document-status-readonly-style"
I've build geany from git and updated gtk to 2.24.16. The problem persists.
No styles get applied at all, e.g. tab's close button does not change, in any theme except for Raleigh and LargePrint(magnified Raleigh). Tested everything from gnome-themes-2.32.1. I've used gtk-chtheme to change the theme.
@kudah: OK, I tested gtk-chtheme and I understand what's going on. And it's not Geany's fault. It's just that gtk-chtheme is a crappy thing.
Let me explain. GTK2 theming supports different level of priority, basically the user settings have precedence over the theme's settings. The correct way to set a GTK2 theme is to set the gtk-theme-name setting, so GTK knows which theme to use. However, gtk-chtheme, instead of setting the theme name, it includes the themes in your user's settings, settings which have precedence over Geany's. And then you don't see the settings.
For me it's not a bug in Geany because we cannot do anything better without making it impossible for the user to change our styles (which is the main point of the theming stuff); for me it's just that gtk-chtheme is dumb and includes the style in the user's settings instead of setting the theme name.
So IMO the fix is for you to replace the `inculde "/path/to/theme"` in your ~/.gtkrc-2.0 with a proper `gtk-theme-name "yourtheme"`.
@glanzick could you check your own ~/.gtkrc-2.0 and see how it looks?
…and I tested under ArchLinux/KDE4 and indeed sees the issue as well.
Apparently the KDE stuff that sets the GTK style can't deal with style priorities; which unfortunately are the only way to leave the possibility to override our styles to the users.
A workaround is to copy $prefix/share/geany/geany.gtkrc to ~/.gtkrc-2.0 (or append its content), and remove the occurrences ":theme" in it (e.g. replace "style:theme" with "style").
Fix our custom style under KDE and for people using gtk-chtheme
OK, I hate KDE and gtk-chtheme. But guys, please test the attached patch. It should fix the problems you have, both.
Works for me.
Works for me as well. Sorry for the non-response, didn't know that I had to click a button to get notified by e-mails.
Ok thanks guys, it's now committed and probably will be in a bugfix release soon.
Fix released in 1.23.1