Related to https://github.com/geany/geany/issues/2185 and https://github.com/geany/geany/issues/2180,
I know that _"The colour scheme set for the editor widget where the code is, is again totally independent of any terminals, it's only used to style syntax highlighting of code in the documents notebook"_, but it is creating high-contract and not easy on the eyes.
This is what i get out of the box:
![image](https://user-images.githubusercontent.com/422244/59570765-336a0f80-906b-11e9...)
I.e., the editor widget is light-on-dark, while the side bar and the message windows are both dark-on-light. Such high-contract between the windows will make the eyes fatigue easily.
Please consider having a unified colour scheme on all three windows to easy the eyes. Thanks.
The items outside the editor widget are controlled by your desktop theme, so if your desktop isn't dark, neither is that part of Geany.
Although I agree with you that letting random external themes mess with your applications look and feel is a bad idea, the powers that be have determined that its more important that the application looks like the rest of the desktop than it be internally consistent, so this will not change.
But GTK does give you a means of setting individual styles for applications, see the manual.
Closed #2196.
Closed because behaviour is intended.
Reopened #2196.
I think this is a reasonable enhancement request that could be mostly implemented with not too much work. The three areas as I see it are:
* GTK theme: You can request to be put in "dark mode" like in [@b4n's plugin](https://github.com/b4n/geany-plugin-dark-theme/blob/25fa14a97c2c1f1b1a2d7da3...) which is just a few lines of code.
* Scintilla theme: Not counting actual dark themes, this could be done simply using the existing "invert syntax highlighting colors" functionality.
* VTE theme: I guess this would be similarly invert the foreground and background colours using the libvte API.
Due to above, re-opening and labeling as an enhancement.
thanks a lot @codebrainz
Nah, @codebrainz misread my reply, it was not about the amount of work (no matter how suspect @codebrainz estimates are :) but that it is unlikely to be accepted if it makes the application override the theme.
But @codebrainz reference to @b4n's plugin makes the point that there can be no objection to it being implemented as a plugin, just don't enable it if you don't like the result :)
@suntong I will however point out again that you can already control anything the GTK theme can. If you put it in the local geany.css file it will override the theme. It might take some research to find the right CSS selectors, but since that file only affects Geany you can probably be fairly blunt in your selectors.
Yeah, I meant to add more to my comment by was carried away in my other tasks.
I meant to add that I'll change my desktop theme to a dark one, as I used to have a nice one before, and didn't know it is not working any more.
So I'm happy with that solution but will leave the issue open for you to do whatever you want.
it is unlikely to be accepted if it makes the application override the theme.
It doesn't really _override_ the GTK+ theme, it just [requests the "dark" variant](https://developer.gnome.org/gtk3/3.2/GtkSettings.html#GtkSettings--gtk-appli...) of the same theme, if one exists. Given that many IDEs/editors these days come out of the box with a dark widget theme (ex. QtCreator, VisualStudio, Atom, VSCode, SublimeText, etc.) it seems like a good use case.
makes the point that there can be no objection to it being implemented as a plugin
Other than it being 60+ lines of boilerplate for 2 function calls :)
Anyway, I think we should leave this open for now since it's a highly requested feature than can be implemented without a lot of code changes if someone feels like doing it. I might have a try at doing it myself if I get bored. Even though you can technically get the same effect by fiddling with several different obscure config files and preferences, IMO it would be super convenient to just have a "dark mode" checkbox that satisfies people who have tired eyes.
Or "Dark mode" plugin.
Or "Dark mode" plugin, could even extend @b4n's.
It would probably be not much different amount of work exposing Geany internals for inverting the Scintilla colour scheme and providing access to the VTE than it would be to just add a "meta" preference which controls all three 3 things at once in core. Also users have to find the plugin, install it, and active it (ie. it doesn't work out of the box). This seems like as much hassle as hacking around with config files/preferences to get Geany dark.
Posting back in hoping that this can be expedited, as I found myself stuck in such situation.
- I'm using Ubuntu Mate 18.04.1, and - I found myself not able to switch the GTK theme -- flipping through the Themes in `gnome-tweak-tool`'s "Applications" drop down has no effects at all. - and now, I found myself can't even switch geany-theme either -- I chose a light theme (from https://github.com/codebrainz/geany-themes/tree/master/screenshots#the-epsil...) by selecting Change Color Scheme... from Geany's View menu, _restarted_ `geany`, but the editor still has a dark window:
![image](https://user-images.githubusercontent.com/422244/59976616-11095200-9595-11e9...)
Thanks!
@suntong no idea about the GTK+ theme issue but for Geany/Scintilla theme, do you have `Preferences->Editor->Display->Invert syntax highlighting colors` ticked?
@suntong doesn't Ubuntu have a desktop menu/preferences tool to select themes? That should set both GTK2 and GTK3 themes and work better than hacking with Gnome tweak.
And to expand on @codebrainz comment, "invert syntax highlighting colors" applies to whatever colours are being used, whichever theme they come from.
Hello,
On Debian testing, when GNOME is using a dark theme, Geany seems to have the inverted behavior of the screenshots already present in this issue, ie. the widgets are correctly black but the default theme is white.
![Screenshot 2020-05-01 20-01-10](https://user-images.githubusercontent.com/989521/80829148-e17c9a80-8be6-11ea...)
The [“gtk-application-prefer-dark-theme” property](https://developer.gnome.org/gtk3/stable/GtkSettings.html) could be used to determine if the current theme is light or dark, to select a better default theme given the user’s preferences context.
@MicroJoe all widgets except the editor widget already use the GTK theme settings. The editor widget does not use the GTK theme since the theme does not cover the complexity of mapping syntactic entities to styles. Thats what the Geany colour scheme (sometimes misnamed "theme" as well) does. But a colour scheme contains no information that its light or dark so even if Geany can determine from the GTK theme that it is dark, it can't select a colour scheme since they are not marked light or dark, and even if they were, which one is the best to select as a dark version of whatever the user has chosen as their light colour scheme.
IMHO it would be a waste of somebodys time making that work anyway, how often do you switch from dark to light? Just select the colour scheme from the menu, and if you don't have one, download one from https://www.geany.org/download/themes/ or make your own.
Also I note that browsers don't turn the window dark just because the desktop theme does dark.
But a colour scheme contains no information that its light or dark so even if Geany can determine from the GTK theme that it is dark, it can't select a colour scheme since they are not marked light or dark, and even if they were, which one is the best to select as a dark version of whatever the user has chosen as their light colour scheme.
Currently a few themes use the convention of `foo-light.conf` and `foo-dark.conf` for the light/dark variants of a theme, which I suppose could be formalized. It'd have to be not annoying though, perhaps controlled by a preference or something, so that people who like to use a light editor colour scheme with a dark GTK+ theme or vice versa could opt-out somehow (or make it opt-in).
And of course, as with everything, it requires someone who cares enough for the feature to actually design and implement it.
how often do you switch from dark to light?
Usually multiple times a day, depending on my needs :)
I defined a keyboard shortcut for this to make it easy to toggle between light and dark mode. All apps I'm using adjust colors automatically - except the Geany editor widget. Most websites I visit regularly adjust automatically, too.
even if Geany can determine from the GTK theme that it is dark, it can't select a colour scheme since they are not marked light or dark
What if Geany lets the user choose a light and a dark theme for the editor widget (instead of only one theme as it is now). Would that make things easier?
All apps I'm using adjust colors automatically - except the Geany editor widget. Most websites I visit regularly adjust automatically, too.
I would expect your browser does not turn pages dark when the desktop theme changes to a dark theme, it doesn't here.
AFAICT many people want to keep the current situation since they grow used to the colours semantic meaning, its not just coloured to be pretty, the colours have meaning, eg "all types are yellow, strings are green etc" and they don't swap light/dark often enough. So as @codebrainz said, "somebody" for whom it is more important to swap light/dark colour schemes needs to design and implement it.
Thank you for your answer.
I would expect your browser does not turn pages dark when the desktop theme changes to a dark theme, it doesn't here.
It depends on your browser settings. If you set the theme to "System theme" in Firefox (and probably similar in other browsers) the browser itself and web pages can adjust to dark/light mode automatically (a setting in about:config may prevent this, though). You could test this e.g. with GitHub (while not logged in!), it works for me. More and more websites nowadays use the `prefers-color-scheme` CSS media feature to determine if a user wants a light or dark theme.
AFAICT many people want to keep the current situation since they grow used to the colours semantic meaning
Understandable. It took me some time to get used to the colors' semantic meaning of a second theme. Users who want to keep the current situation could just use the same scheme for dark and light mode.
Unfortunately I'm not able to design and implement this. So I'm now slowly moving away from Geany because it's cumbersome to manually change the scheme each time when toggling light/dark mode.
Geany has served me well during many years and I still think it's a great IDE/editor. Thanks a lot for all your work!
Well github works the way described by @codebrainz, it chooses between two themes depending on the light/dark setting, but its the only one (of the websites I regularly use) that allows this.
Everyone who works on Geany is a volunteer, they work on what they are interested in and are capable of. They are not directed what to work on. So when/if any specific feature request will be implemented is unknown.
It is unfortunate that this feature is so significant to your use-case that you have to abandon using Geany entirely. No tool is going to be suitable for all and every use-case, I use Vscode for significant C++ projects, but Geany for other less structured uses.
The items outside the editor widget are controlled by your desktop theme, so if your desktop isn't dark, neither is that part of Geany.
This does not seem to be working.
My desktop theme settings: ![image](https://github.com/geany/geany/assets/33469/c657c5af-f25d-4010-9b6e-50575622...)
My Geany: ![image](https://github.com/geany/geany/assets/33469/4a195555-60ea-4f29-bafa-d08f32a8...)
This is a fresh install of v2.0.0 after cleaning everything I could find of the previous installation just to make sure it's not interfering.
@Carighan that desktop settings menu is setting a _Windows_ theme.
Geany is a portable GTK application and the GTK toolkit uses its own themes. Unlike Linux and BSD, Windows does not set the GTK theme so it has to be done separately. The FAQ https://www.geany.org/documentation/faq/#how-to-change-the-gtk-theme explains how to change it on platforms that do not do so automatically.
Oh. Thank you, did not know that. Apologies.
github-comments@lists.geany.org