Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should work well in dark mode on its on, by default. #3407

Open
HubKing opened this issue Feb 18, 2023 · 3 comments
Open

Should work well in dark mode on its on, by default. #3407

HubKing opened this issue Feb 18, 2023 · 3 comments

Comments

@HubKing
Copy link

HubKing commented Feb 18, 2023

It's 2023. It should work better in dark mode out-of-the-box, without requiring the user to manually search the Internet, download/edit/copy config files.

  1. At least one colour theme for dark mode should be included by default, without requiring the user to visit https://www.geany.org/download/themes/

  2. A colour scheme for dark mode for the output panels should be included by default, and either let the user select it in the Preferences or automatically use it in dark mode, not telling users to write a CSS file for it.

image

@elextr
Copy link
Member

elextr commented Feb 18, 2023

Geany is a GTK application, so everything except the edit pane should "just work" and follow the desktop GTK theme selected. Certainly here Geany follows the theme selected for the desktop as I change from Mint-Y to Mint-Y dark. And I don't even have to restart Geany. But note the desktop is actually selecting a different theme that somebody has created a CSS for, nothing happened automagically. If this is not happening for you maybe discuss it with your distro.

Unfortunately no desktop themes have styles for "compiler error", "compiler context", "compiler message", how remiss of them!!! So additional CSS needs to be supplied for those items, hence geany.css. Of course if someone contributes geany-dark.css and the method of selecting it a PR could be accepted.

The CSS also has no effect on the edit pane because that applies styles to lexical entities, and again no desktop themes have settings for those. So that will always have to have additional setup, hence the "colour scheme" for that. [Edit: same for other editor/IDEs, see Vscode for example.]

Making dark/light colour schemes whilst ensuring appropriate visual contrast when there are many colours involved can be done in two ways:

  • manually creating dark schemes, several of which exist in Geany-themes and can be loaded and selected as you wish, or
  • inverting the colours in the selected theme, which is available with Edit->Preferences->Editor->Display->Invert syntax highlighting colours.

@b4n
Copy link
Member

b4n commented Feb 18, 2023

#3013 should help wrt compiler window.

Regarding having a dark theme by default, why not, but it'll be hard to agree on which one :) (Not that I care myself, dark themes are a terrible idea that doesn't scale anyway. Troll intended 😁 )

The CSS also has no effect on the edit pane because that applies styles to lexical entities, and again no desktop themes have settings for those. So that will always have to have additional setup, hence the "colour scheme" for that.

That's not entirely true. Nowadays it's usually somewhat possible to know whether the system theme in uses is light or dark, and we could have the same info for editor themes and/or have a "dark default". So sure, people will still want to select their preferred theme, but we could have a default following a tad better the system theme in this case.

@elextr
Copy link
Member

elextr commented Feb 18, 2023

Regarding having a dark theme by default, why not, but it'll be hard to agree on which one :) (Not that I care myself, dark themes are a terrible idea that doesn't scale anyway. Troll intended 😁 )

Themes are a terrible idea that leaves your application at the mercy of unknown idiots that "design" them (troll also intended 😁 )

But yes the point being which to agree on?

That's not entirely true.

Thats entirely true. GTK themes do not set properties for lexical entities. The term Colour Scheme or Color Scheme depending which school you went to and how your Geany is translated, refers to the Geany conf file that sets lexical entity colours to differentiate it from the GTK theme. It has been agreed that the geany-themes repo name is confusing, but it is what it is.

Nowadays it's usually somewhat possible to know whether the system theme in uses is light or dark

What I think you mean is that there is some sort of fuzzy indication by reading the GTK setting gtk-theme-name and see if it ends in -dark.

Geany could load colour-scheme-dark instead of colour-scheme selected depending on above, or could automatically set the Invert syntax highlighting colours property, obviously with an option for the user to prevent such bad annoying retrograde automatic behaviour ;-)

Or even just shipping default and default-dark might be enough in the first pass so the user can select easily, although default might need to be separated from filetypes.common.

[Edit: probably not, just need to ship a default-dark.conf]

Now all it needs is "somebody" to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants