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 not working #1746
Comments
|
Themes are controlled by GTK, so if you can somehow set the environment variable Apparently the "Dark Theme" setting only changes the icons: xournalpp/src/control/XournalMain.cpp Lines 322 to 325 in 8052bee
|
|
Oh i just got confused by the option name then, i though it as a whole dark theme. Well since it's a missing feature this could become a low priority enhancement request, yeah. |
I would say it's a bug since it's misleading; it should really be renamed as "Use dark mode icons." |
|
This setting seems to be not working at all — even for toolbar icons — on my Linux installation. I have turned this setting on, and launched xournalpp (at commit 46a4dc8) with
Nonetheless, I see the same toolbar icons being used (i.e. not the icons from iconsDark). See, e.g., the icon for the Text tool or the brush sizes both of which should be white in colour if used from iconsDark. |
|
It appears that the From e3f54079c01f23f39de3817b912a34fa1c0cea36 Mon Sep 17 00:00:00 2001
From: Atri Bhattacharya <badshah400@gmail.com>
Date: Wed, 11 Mar 2020 13:00:31 +0100
Subject: [PATCH] Prepend iconsDark path after setting default path.
When the "dark theme" option is set, the iconsDark directory should be
the first dir where the icon theme should search for the icon. By
prepending this path after the default icons path has been set, we make
sure that this dir is the first in the list of dirs to look-up icons.
Fixes issue #1746.
---
src/control/XournalMain.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/control/XournalMain.cpp b/src/control/XournalMain.cpp
index b996b5c0..9609db72 100644
--- a/src/control/XournalMain.cpp
+++ b/src/control/XournalMain.cpp
@@ -319,13 +319,14 @@ auto XournalMain::run(int argc, char* argv[]) -> int {
auto* control = new Control(gladePath);
+ string icon = gladePath->getFirstSearchPath() + "/icons/";
+ gtk_icon_theme_prepend_search_path(gtk_icon_theme_get_default(), icon.c_str());
+
if (control->getSettings()->isDarkTheme()) {
string icon = gladePath->getFirstSearchPath() + "/iconsDark/";
gtk_icon_theme_prepend_search_path(gtk_icon_theme_get_default(), icon.c_str());
- }
- string icon = gladePath->getFirstSearchPath() + "/icons/";
- gtk_icon_theme_prepend_search_path(gtk_icon_theme_get_default(), icon.c_str());
+ }
auto* win = new MainWindow(gladePath, control);
control->initWindow(win);
--
2.25.1
|
Looks good to me, please do so! |
|
I have a patch which actually makes the app use the dark theme variant of the GTK theme, if the theme has one. The patch itself is rather straightforward (see below). I use it for my daily activities and prefer this mode over the default one. Do you — the app developers — think this might be useful? I can send a PR if so. diff --git a/src/control/XournalMain.cpp b/src/control/XournalMain.cpp
index fd746257..0121261c 100644
--- a/src/control/XournalMain.cpp
+++ b/src/control/XournalMain.cpp
@@ -323,6 +323,8 @@ auto XournalMain::run(int argc, char* argv[]) -> int {
gtk_icon_theme_prepend_search_path(gtk_icon_theme_get_default(), icon.c_str());
if (control->getSettings()->isDarkTheme()) {
+ g_object_set(gtk_settings_get_default(),
+ "gtk-application-prefer-dark-theme", TRUE, NULL);
string icon = gladePath->getFirstSearchPath() + "/iconsDark/";
gtk_icon_theme_prepend_search_path(gtk_icon_theme_get_default(), icon.c_str());
}
--
2.25.1 |
|
@badshah400 That would be useful for Windows users, but I think we should make that a separate option (e.g. |
|
@R4ygen I figured out a way to enable dark theme on Windows. Find where Create two nested folders, [Settings]
gtk-application-prefer-dark-theme=1If you did everything correctly, you should now see the program in dark theme. |
I have the same issue on Manjaro KDE with a Breeze Dark and the Adwaita Dark theme for GTK. I hope this can be fixed soon, as trying to identify the hardly visible icons makes me become a headache. ;) It doesn't seem that I can explicitly use a light theme only for Xournal as a workaround until the issue is fixed. :-( |
|
@ericschdt This was fixed by commit 7e1b862. If you are installing from a package in Manjaro, you will need to patch the sources with this commit and rebuild the package. |
That worked out perfectly! |
|
For anyone on Ubuntu, you might need to remove the |
|
So the dark theme for now does not provide page color and primary pen (black) to switch color automatically like in onenote? |
|
No, the dark theme only affects the color of the application buttons/background. |
Is there any planning to implement such feature described above? |
This has been requested before (#1781) but no one has tried implementing it. |
|
One solution is to set the page color manually. I used #31343A so looks like a chalkboard. |
|
I am using |
|
I use Xournal (nightly) and the dark theme isn't working. Neither the Repo nor the Flatpak. This is really sad, because you can hardly spot the dark icons on dark background. Is there any way to fix this? And yes, using Dark Theme is enabled in the setting menu for both, Flatpak and nightly. Edit: Fixed by installing a dark theme icon set, see also: #3034 (comment). I left this here, if someone have the same issue. |
How do you install this dark theme icon set? |
@trydercal As far as I remember, for the native App you have to enable dark variants of your system icons, i.e. Mint-Y-Darker. Maybe there is a hint in the Xournal++ Documentary, if not we may add this to the docs. |





Hello, i just installed the latest release of Xournal++ (1.0.17) on my Windows 10 Pro machine, as an alternative to OneNote.
So far so good apart for one thing: I can't make the dark theme working.
If i check the option under Preferences -> View -> Dark theme and reboot Xournalpp, nothing changes.

So far i've been able to change the page color and the background, but i would like to change the toolbar, menu and window colors too.
I've found some config files in the directory \Program Files\Xournal++\ui but i couldn't figure out if there's some values i can manually change there to edit the theme colors.
I've already tried to reinstall the program (always through the release automated installer) and check for steps i could have skip in the installation instructions and FAQs, but nothing.
Thanks in advance
The text was updated successfully, but these errors were encountered: