-
Notifications
You must be signed in to change notification settings - Fork 9
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 GTK+ theme is not used when running in the Flatpak sandbox #11
Comments
You can use an environment variable for that:
You can set this environment variable on revolt itself before starting the main class. |
@clopez: That's a hacky workaround. If the Flatpak runtime provided a different default theme, Revolt would still use Adwaita, instead of the dark variant of the current theme. Unfortunately, something like Builder can use the dark theme while in the Flatpak sandbox, so I am positive that this can be solved without using an environment variable inteded for debugging. |
This is fixed as of 5f7d465 — the recent refactoring and reordering of initialization code made it work. |
Reopening: when “Adwaita” (the default) is the theme chosen by the user, running inside the Flatpak does choose the dark variant, but when using any other theme (like Arc, which includes a dark variant), the dark variant is not chosen. So, in order to reproduce this:
Of course the non-Adwaita theme is not chosen, because it's not available inside the sandbox: GTK+ picks the light variant of Adwaita, though I would expect that the dark Adwaita variant gets chosen. |
I have a weird issue as well regarding this. I run stock Gnome (no theme fiddling) but Revolt starts with the dark variant for some reason. |
@mattiasb: The dark theme is correctly picked when not using the Flatpak builds. Are you using Revolt by installing it in your distro directly, or via Flatpak? |
I use the Flatpak build. But looking at the code now it looks like you're setting the dark variant unconditionally, so using the dark variant might even be intended? |
@mattiasb: Actually, using the dark theme is intended — Adwaita is the only theme option so far when running as Flatpak, and the normal (light) variant hurts my eyes badly, especially title bars and header bars, but the dark theme is passable. At any rate, Riot has just gained a dark theme, so what we may want to do here is trying to pick Riot's setting and choose the GTK+ theme variant depending on what the user has selected in the Riot preferences (or supply a setting in Revolt's settings window which also applies to Riot). |
Is there no way for Flatpak apps to access the system-installed themes? This seems like a severe limitation. Edit: Nevermind, it's a limitation of the platform. flatpak/flatpak#114 Edit 2: A temporary solution is to copy the theme you want, e.g. |
@hackel Themes depend heavily on the version of GTK used, so accessing system wide themes would often cause issues if they are incompatible with the Flatpak runtime used. But the Flatpak developers are actively working on a solution using extensions, see flatpak/flatpak#114 |
I think the correct thing here is to wait for upstream support handling runtime-external themes in Flatpak, and once that is fixed I can add a note in the README pointing what the solution is. Revolt should not need do anything in this regard. Note that #38 is still relevant, and should be implemented at some point. |
I know this is a flatpak thing, but the appropiate github issue on the flatpak repo is closed. i know that there are theme extensions for flatpak now, but i cant get Arc-Dark to set(it sets to adwaita dark..) Could anyone here help me or point me in the right direction? |
Despite having the magic incantation needed to choose the dark theme variant:
...when running inside the Flatpak sandbox, Adwaita non-dark is still the chosen theme.
The text was updated successfully, but these errors were encountered: