-
Notifications
You must be signed in to change notification settings - Fork 4
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 mode doesn't work #14
Comments
Even outside of flatpak dark mode may not work depending on the themes you have installed. Sometime ago a user having this problem on KDE fixed it by installing a dark theme that could be used by gtk4. But I do not remember now exactly what he installed. The dark mode isn't provided by EasyEffects. We just ask gtk to use one that is available and it does all the work. |
Furthermore see wwmm/easyeffects#1106 |
Dark theme is not working on Flatpak version. Adding the test results from wwmm/easyeffects#1158 here:
Distro: openSUSE Tumbleweed |
I find this strange how unreliable it is. I still can't figure out why I can get dark theme working on KDE but others can't. Regardless the actual fix seems to be integrating with the upcoming freedesktop dark mode preference, which is now implemented in the usual portal. But for EasyEffects to take advantage of that currently we'd need libadwaita or a similar library. @wwmm does that sound like something interesting to you? libadwaita is still quite new and won't fully be released before GNOME 42, so it might be something best to wait on. |
People suggested it to me in the past. The main problem is that we use gtkmm to interact with gtk. And libadwaita is a C library probably designed for direct use in gtk and not gtkmm. It may work but I doubt it will be a plug and play process. And it is also not clear if it will keep working as updates to gtkmm and libadwaita are made. |
I found another GTK4 C++ app, they seem to use gtkmm as well as libadwaita. I asked in the libadwaita matrix room, indeed no proper libadwaita bindings exist for C++ yet and gtkmm can't help with libadwaita. Though other than using the C API one could also use D-bus manually. There might be a blog post about that so maybe that'll help. At least right now since libadwaita is in an alpha state I don't think much is guaranteed across versions. But when it's properly released it should be more reasonable to depend on. |
I see. Gtkmm allows access to the gtk object that is being wrapped. But from this point on you are writing C code. And as much as I like the end result gtk is able to provide programming GTK in C is really painful... |
See https://blogs.gnome.org/alexm/2021/10/04/dark-style-preference/ Also this snippet for SDL: https://gist.github.com/BrainBlasted/931b763fc3dcdec2fc55a4ef64fca1ba Not sure how easy it is to implement support for dark mode preference in GTK4 without libadwaita. Although keep in mind this feature will only really be useful (i.e. implemented in GNOME Shell/Settings) next year when GNOME 42 releases. |
The site says to use DBUS. What is probably painful... Let's wait and see what happens. At this moment the code we use for that requires only one line and no additional dependency. But does not work in Flatpak... |
The built in "Use Dark Theme" toggle already works for me in Flatpak on GNOME. And seems to also work at least for me on KDE on Fedora 35. Not sure why it doesn't work for some users. There is some variable with KDE theming that we're missing. |
@LifeWatcher123 @akkisagiraju there is a flathub-beta branch available now, updated nightly. It should better support dark mode, and in the future KDE's settings app should be able to set it through the portal more reliably than before. I believe KDE already landed at least part of that change in xdg-desktop-portal-kde, but there might still be more. You can test it here: https://github.com/wwmm/easyeffects/wiki/Package-Repositories#nightly-flatpak |
libadwaita build with color scheme portal is released now, see the wiki. If you have questions or problems feel free to reopen this. |
Even after restarting the machine, the application is still on the light theme.
The text was updated successfully, but these errors were encountered: