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

Dark Theme won't go away #5422

Closed
lamyergeier opened this issue Dec 22, 2023 · 3 comments
Closed

Dark Theme won't go away #5422

lamyergeier opened this issue Dec 22, 2023 · 3 comments
Labels

Comments

@lamyergeier
Copy link

lamyergeier commented Dec 22, 2023

Operating System

Linux

(Linux only) Distribution

Fedora 39

(Linux only) Desktop Environment

Gnome

(Linux Only) Display Server

Wayland

Installation Method

dnf

Xournal++ Version

1.2.2

libgtk Version

3.24.38

Bug Description

As you can see in the following image the dark theme is disabled but it persist even after I reboot my operating system:

image

Please may be provide a command line option to disable or enable dark mode as several options such as Latex have very bad visibility in dark mode. Its hard to identify icons due to poor contrast (see below screenshot: rendered latex equations can't be seen)!

image

Expected Behaviour

Ability to disbale dark theme

Steps to Reproduce

See screenshot above

Additional Context

No response

Requested Solution

Please provide a cli option to force light mode --light or dark mode --dark

@rolandlo
Copy link
Member

The issue with the LaTeX background was fixed in #5307. It has been merged into the release-1.2 branch, not yet into master.

The "dark theme" setting only adjusts the icons and some css-styles (like for the sidebar). It must be set in conjunction with the system theme.

@tmoerschell
Copy link
Contributor

The window theme can be adjusted by setting the GTK_THEME environment variable. If you don't find the exact name of a light theme, I think when the environment variable is set to something that doesn't exist, it defaults to a light theme.

The "dark theme" setting only adjusts the icons ...

Since there are a few system icons that will not be adjusted by this setting, I still had to use a hack to complete the custom theming: I extended the environment variable XDG_DATA_DIRS=~/.icons-light:$XDG_DATA_DIRS. Then I created a directory ~/.icons-light/icons/<default-theme>/ (e.g. breeze-dark in my case), and pasted the files from the light theme (found at /usr/share/icons/<light-theme>/) into that directory.

I do wonder if those system icons could also be handled by the setting in Xournal++.

@bhennion
Copy link
Contributor

@lamyergeier Is this still an issue for you? If so, what GTK theme are you using?
Essentially, we can only influence the theme variant (dark or light) from within the app if the theme used supports it and is installed properly.
This means if GtkSettings::gtk-application-prefer-dark-theme is followed by the GTK widgets.
I don't quite understand why is works for some themes and not for others though.

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

No branches or pull requests

4 participants