video-downloader icon indicating copy to clipboard operation
video-downloader copied to clipboard

Theme switcher doesn't work on elementary OS 6

Open doamatto opened this issue 3 years ago • 5 comments

OS: Elementary OS 6 (Odin) App version: 0.8.5

Steps to reproduce:

  1. Set to dark theme inside of the app
  2. Close app
  3. Re-open to see the app still in the light theme

Expected behaviour: The theme should switch to the dark theme, not stay with light theme.

doamatto avatar Aug 11 '21 18:08 doamatto

Are you using one of the default elementartOS themes?

GustavoPeredo avatar Aug 11 '21 20:08 GustavoPeredo

Technically, yes; I should have clarified that I meant the integrated theme switcher, rather than the new dark style from Elementary

doamatto avatar Aug 11 '21 20:08 doamatto

Workaround

@doamatto I found a temporary solution for this issue, but solving the real problem might be a little harder.

Terminal

To correct the way the application looks run the following command in your terminal: flatpak override --user --env=GTK_THEME="Adwaita" com.github.unrud.VideoDownloader To set it to dark mode use: flatpak override --user --env=GTK_THEME="Adwaita:dark" com.github.unrud.VideoDownloader

Flatseal

This can also be done using Flatseal: Open Flatseal > Choose Video Downloader > Scroll down to Environment Variables > Add GTK_THEME="Adwaita" or GTK_THEME="Adwaita:dark" > reopen Video Downloader

Source: https://github.com/elementary/default-settings/discussions/164

Bildschirmvideo von 13-08-2021 15_31_42


The issue

I'm 90% sure the weird buttons and lack of dark mode are problems caused by elementary not coming with the Adwaita stylesheet installed, therefore apps aren't using the Adwaita theme, rather they are using the GTK fallback theme. I think the best way to solve the issue for not only Video Downloader but all other GNOME Applications is by reporting upstream and waiting...

UPDATE: Under elementaryOS on GNOME Shell the theme switch seems to work fine. I'll see if the issue is something that happens on other desktop environments, maybe things are even more complicated,

UPDATE 2: After testing in other Desktop Environments (specially KDE Plasma), it seems to work fine. Unfortunately I cannot say for sure what causes it to work/not work.

Bildschirmvideo von 13-08-2021 17_31_51

Possible "solutions":

  • Package Adwaita with Video Downloader
    • Pros:
      • No problems regarding theme compatibility
      • Dark mode works on any OS
    • Cons:
      • Users will not be able to use Video Downloader with custom themes if they don't hack the code
      • One more dependency to handle
  • Package Video Downloader with the GTK_THEME environment variable AND switch the environment variable on button press
    • Pros:
      • Reduced problems regarding theme compatibility
    • Cons:
      • Users will not be able to use Video Downloader with custom themes if they don't change the environment variable
      • Too hacky and dirty

GustavoPeredo avatar Aug 13 '21 19:08 GustavoPeredo

I am also facing this same issue on xfce 4.16 on MX Linux 21. Currently, I used the "Terminal Override" method to solve it

abhi-deshpande avatar Jan 18 '22 05:01 abhi-deshpande

I had the same issue in LMDE 5. The workaround solve it.

ViniciusBRodrigues avatar Apr 21 '22 13:04 ViniciusBRodrigues