Hello!
After last changes on 1.28 for GTK3, in trying once again to be if I could move to Geany with GTK3 , which I prefer over GTK2.
One thing I've noticed is that the colours of the toolbar does not match with the colours of the rest of the interface. Here is a snapshot of my Geany with GTK - 3.0: ![screenshot from 2016-08-18 00-44-35](https://cloud.githubusercontent.com/assets/2631430/17756021/b001e35e-64dd-11...)
I'm on Ubuntu 16.04 with Ambiance theme.
Geany uses a normal GTK toolbar and sets the [`primary-toolbar`](https://developer.gnome.org/gtk3/stable/GtkStyleContext.html#GTK-STYLE-CLASS...) class on it, as expected for main toolbars. The theme is then responsible for styling it as it sees fit.
I'm not very surprised a theme would style the toolbar (and menubar) dark, as many themes do it. I don't think this is a bug in Geany; but please make sure Geany is the only GTK3 application with a toolbar that is styled this way: if it's the case, we might need to further track this down.
I have seen this on many Gtk3 application using different themes. So I guess too it's more likely an issue with Gtk + theme instead of Geany. Unfortunately because Geany we would be able to fix easier.
Well, GTK3 Geany follows the themes fine here, if I select a theme that changes the toolbars, the Geany toolbar changes to match it.
So I don't think its a Geany problem, its the theme. If we go introducing special handling for particular themes we will likely break others, so its not worth it.
Actually what I would expect is that the rest of the interface: tab bar and message window, become also tuned to a dark theme.
Geany doesn't as for the dark variant, and shouldn't. It's not an application where the UI should disappear like it can be though for a video player or an image viewer; if you want all windows to use a dark theme, use such a theme.
Alternatively, it might be possible to for some applications to use the dark theme variant without modifying them, I don't know.
Closed #1179.
Actually, to get a dark theme everywhere, you can set `gtk-application-prefer-dark-theme=1` (in the `[Settings]` section) in *~/.config/gtk-3.0/settings.ini*. It *might* be possible to restrict that to a single application, I don't know.
hello back! I've set up `gtk-application-prefer-dark-theme=1`in */etc/gtk-3.0/settings.ini* (I've edited system-wide config since I don't have any *~/.config/gtk-3.0/settings.ini* file) I've run Geany again after I changed it but nothing has changed. This is the only message I get from the terminal:
`(lt-geany:13164): Geany-WARNING **: Failed to load custom CSS: <broken file>:1:0Failed to import: Error opening file: No such file or directory`
@Akronix did you install Geany somewhere or are you trying to run it from the source dir?
Also you can just create that settings.ini file if it doesn't exist (it shouldn't exist by default probably).
As I was testing the GTK-3 version, i was running it from the source dir. Should I install it on the system and run it from there?
On Aug 25, 2016 2:03 AM, "Matthew Brush" notifications@github.com wrote:
@Akronix https://github.com/Akronix did you install Geany somewhere or are you trying to run it from the source dir?
Also you can just create that settings.ini file if it doesn't exist (it shouldn't exist by default probably).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geany/geany/issues/1179#issuecomment-242245099, or mute the thread https://github.com/notifications/unsubscribe-auth/ACgnBq2JtIYQEjoLotRUMd0jUbFapUS5ks5qjNu2gaJpZM4Jm-Ak .
@Akronix you need to install it somewhere yes (you can choose where with the `--prefix` configure option). Geany doesn't support being run without having been installed.
You should install it somewhere, even if it's just somewhere under the build directory. Personally I use `/opt/geany` for random testing builds of Geany, but somewhere under `$HOME` is probably a better idea. Just use the `--prefix` argument for `configure` script like `./configure --prefix=$HOME/test-builds/geany` or whatevr.
If you want to build an experimental version, make a directory say `/some/path` and download and extract the tarball into that directory (creating a `/some/path/geany`) then
``` cd /some/path/geany ./configure --prefix /some/path --enable-gtk3 make install cd ../bin geany -c ../config ```
makes a whole brand new current Geany totally within `/some/path` which won't interfere with your normal system install or your normal settings.
Experiment happy :)
Hi again!
I've followed all your steps and I don't see any change in the UI :disappointed: (well, if doesn't show up that Geany-WARNING about a custom CSS file, but that's it).
This is how I see it: ![screenshot from 2016-08-25 18-09-51](https://cloud.githubusercontent.com/assets/2631430/17976759/27377832-6aef-11...)
Well, installing it should make Geany work properly, but it won't change how GTK themes it too much. Still, the setting `gtk-application-prefer-dark-theme=1` works for me and selects the dark theme -- and assuming the dark theme is what you want, it should work. But I can't say whether this works at the system level, it might be overridden by the session settings or something. Try and put it in your user's config, as @codebrainz said it's indeed probably not yet existent, but you can create it.
I already did that of putting it on a user's config file :confused: @b4n could you post a snapshot to see how it would like if I had the GTK dark theme activated?
Even if this thread is closed and a bit old already, I want to notify, that at least I also and still (mid 2017) would greatly welcome a nice dark theme for Geany. There is one example, who ignores the global settings and goes dark entirely, with a modern GTK3 look in addition, namely gThumb (the photo and image viewer, in my case ver. 3.5.2).
By the way, how does it go with GTK3? I ask, because many other issues like enhancements could be easier to do and fixed within GTK3, besides the theming problem.
@Johndeep Geany goes just fine for GTK3, some more adventurous distros already deliver the GTK3 version by default.
Geany colour schemes only control the editor colours. If you don't like the colours feel free to make your own dark one. Colour schemes are very personal and what you call "nice" may not be what I call "nice" :grin: so the [colour schemes](https://github.com/geany/geany-themes) repo provides them separate from Geany itself since they are contributed and not in any way necessarily the teams taste.
The rest of Geany follows the system GTK theme. I use Mint-y-dark just fine, but it does depend on how good a job your distro does on the GTK themes, Mint is good, a KDE distro is unlikely to be as good.
@elextr Figures that I would have to create an own theme.
But yeah, as Geany is following the GTK theme of the system, and as there is only few themes, which actually can cover all GTK, XFCE4 and KDE correctly at the same time, it'd still be nice, if Geany would at least choose to be independent from the system theming.
Furthermore (I my humble opinion), one could like a light color theme for daily working like writing or browsing, but has a need for a dark color theme while coding only, without changing everything to dark. As you can see above at @Akronix first image, this is how I also currently use Geany, dark editor theme, but the Greybird theme as frame. It just feels not right somehow.
@Johndeep Geany following GTK+ themes is a feature, it allows it to integrate and feel native in GTK+ desktops (and KDE until GTK+3 broke the world). You can use the default theme, or you can use the dark variant of your theme, use a completely different theme altogether, or just tweak the current theme a bit by just using the GTK+ theme mechanisms. You can have any combination of light/dark that you want with a little tweaking.
@Johndeep You have several options to change the theme used by Geany through the regular GTK means. E.g. one for GTK3 is to set the `GTK_THEME` environment variable, like `GTK_THEME='Adwaita:dark' geany`, which will use the dark variant of the *Adwaita* theme for launching Geany. You can also play with the setting I mentioned previously, or things like `GTK2_RC_FILES` for GTK2, etc.
I really don't think Geany should try and not follow the theme by itself; but I guess a plugin could do that. I just wrote such a plugin simply requesting the dark theme variant for the fun of it and to prove my point: https://github.com/b4n/geany-plugin-dark-theme
Hmm, you got a point there @codebrainz, I somehow also agree the GTK theming as a feature, I also rather like the native feel. And yeah @b4n, thanks for some hints for tweaking, even though the Geany on Debian is still compiled with GTK2 (Geany 1.31, GTK 2.24.31, GLib 2.53.4)..
But could the scrollbar at least be more independent from the native theming? Because it would be a great asset, if the scrollbar position would be more visible. This would not impair the native feel of Geany and would (maybe in addition equipped with something like a keyword indicator) greatly make Geany more usable for large code blocks, I hope.
@Johndeep you can style anything in the UI any way you want using GTK+ theming mechanism. It's out of scope here (and I don't know the details), but Google should have lots of info about theming GTK+ apps (either 2 or 3). There's also some info in the manual explaining the classes Geany exposes to make it a little easier for theming.
@Johndeep if you finally get those colors changed, please, document the process in the [Geany's wiki](http://wiki.geany.org).
If you system is set to a gtk2 theme (a theme, which doesn't have xfwm or so in example), then you can set an arbitrary theme for Geany (compiled with GTK2) by `GTK2_RC_FILES=/usr/share/themes/<your fav. theme>/gtk-2.0/gtkrc geany`
If you have a theme, which has many different supports like Greybird (which has data for GTK2/3, xfwm, metacity etc.), then it seems to depend on what engine is currently used. In my case, since I'm running xfwm, that very theme engine is used and so the command above doesn't work at all.
Call it strange but I'm just observing this behavior.
If you are lucky and your Geany is compiled with GTK3 (like on Arch or maybe Fedora?), then it may be much easier and it is more likely to work with `GTK_THEME=<your fav. theme> geany`
I think.
Since it is GTK3 then, you can also use the `gtk-application-prefer-dark-theme=1` mentioned above, but this change **all** GTK3 apps to dark.
But could the scrollbar at least be more independent from the native theming?
Again, GTK theming can achieve that, in conjunction with the [widget names we set explicitly](http://www.geany.org/manual/#defining-own-widget-styles-using-gtkrc-2-0) just for that reason. You could do e.g. something like that (alter as pleases you):
```ruby style "geany-scintilla-scrollbars" { # select any non-pixmap engine if your theme is using pixmap like e.g. Adwaita does engine "clearlooks" { style = GLOSSY } # and choose the colors you like (possibly also alter "fg", depending on the engine) bg[NORMAL] = "#333" bg[PRELIGHT] = "#444" bg[ACTIVE] = "#666" } widget "*Geany*Scintilla*Scrollbar" style "geany-scintilla-scrollbars" ```
github-comments@lists.geany.org