-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support live theme switching for Linux #7146
Comments
This is supported already, check your KeePassXC version. |
@phoerious In what version was support added? I'm on 2.6.6 which is the latest available. |
Not sure. Long ago. Live switching is supported for light and dark mode on all platforms. Only switching between our themes and the classic theme isn't, because too many components need to be redrawn and the UI ends up a complete mess. |
If you are using the snap distribution that has a hard time picking up themes. That is a known problem with snaps in general. |
To be clear: By live switching I mean clicking the desired theme option in the view menu without a restart. KeePassXC doesn't detect if your desktop theme changed, because Linux desktops don't send the appropriate signals for that. If you mean this, then there is indeed a feature imparity, which we can do absolutely nothing about. |
@droidmonkey I'm not using snap/flatpack but what is available in the package manager (Solus Linux). @phoerious I am indeed referring to detecting if the system theme changed and updating accordingly when using the "Automatic" theme option. KeePassXC is actually essentially the only app on Linux I use that doesn't update on system theme change. e.g. Firefox, Geary, all the GNOME apps, Signal, Joplin, etc all update fine without needing a restart but I guess KeePassXC is implemented differently? If I use the "Classic" theme option, then KeePassXC actually does update on system theme change without needing a restart (for the most part) but there are elements that remain illegible: Unless I restart: |
The classic theme simply uses your system's Qt theme, so that it out of our hands, but tends to work. In the other hand, it is not possible to detect that for our custom themes, because there is no real indication as to whether the new theme is a "dark" theme or not. Our way of detecting that when you choose "Automatic" is to check whether the current palette is "light-ish", but that only works once at startup before we modify the palette with our custom theme. Secondly, there isn't even a signal that we could listen for when a theme change happens. We could check if there are some global QEvents being sent around, but that is highly desktop-specific. |
Oh I see. I guess it's because this uses Qt and everything else I listed as being able to do it uses GTK. |
The new org.freedesktop.appearance.color-scheme key allows us to do this in a reliable way. Recently freedesktop standardized the system dark mode preference in a desktop environment independent way in the xdg-desktop-portal specification. The specification can be seen here: https://github.com/flatpak/xdg-desktop-portal/blob/d7a304a00697d7d608821253cd013f3b97ac0fb6/data/org.freedesktop.impl.portal.Settings.xml#L33-L45 KDE supports this since KDE Plasma 5.24 and Gnome supports this since Gnome 42. Relevant blog post: https://blogs.gnome.org/alexm/2021/10/04/dark-style-preference/ Fixes keepassxreboot#7146
The new org.freedesktop.appearance.color-scheme key allows us to do this in a reliable way. Recently freedesktop standardized the system dark mode preference in a desktop environment independent way in the xdg-desktop-portal specification. The specification can be seen here: https://github.com/flatpak/xdg-desktop-portal/blob/d7a304a00697d7d608821253cd013f3b97ac0fb6/data/org.freedesktop.impl.portal.Settings.xml#L33-L45 KDE supports this since KDE Plasma 5.24 and Gnome supports this since Gnome 42. Relevant blog post: https://blogs.gnome.org/alexm/2021/10/04/dark-style-preference/ Fixes keepassxreboot#7146
The new org.freedesktop.appearance.color-scheme key allows us to do this in a reliable way. Recently freedesktop standardized the system dark mode preference in a desktop environment independent way in the xdg-desktop-portal specification. The specification can be seen here: https://github.com/flatpak/xdg-desktop-portal/blob/d7a304a00697d7d608821253cd013f3b97ac0fb6/data/org.freedesktop.impl.portal.Settings.xml#L33-L45 KDE supports this since KDE Plasma 5.24 and Gnome supports this since Gnome 42. Relevant blog post: https://blogs.gnome.org/alexm/2021/10/04/dark-style-preference/ Fixes #7146
It may be possible now: |
Coming in 2.7 with #7422. |
The new org.freedesktop.appearance.color-scheme key allows us to do this in a reliable way. Recently freedesktop standardized the system dark mode preference in a desktop environment independent way in the xdg-desktop-portal specification. The specification can be seen here: https://github.com/flatpak/xdg-desktop-portal/blob/d7a304a00697d7d608821253cd013f3b97ac0fb6/data/org.freedesktop.impl.portal.Settings.xml#L33-L45 KDE supports this since KDE Plasma 5.24 and Gnome supports this since Gnome 42. Relevant blog post: https://blogs.gnome.org/alexm/2021/10/04/dark-style-preference/ Fixes keepassxreboot#7146
Summary
Live theme switching works for Windows and Mac but on Linux I still need to close and reopen the application for the theme to switch.
Context
Getting feature parity would be most appreciated as having to manually close the app, reopen the app, and finally unlock the database again is not ideal.
The text was updated successfully, but these errors were encountered: