qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
26.96k stars 3.88k forks source link

System theme breaks on 4.4.0 #16008

Open mkrasnitski opened 2 years ago

mkrasnitski commented 2 years ago

qBittorrent & operating system versions

qBittorrent: 4.4.0 x64 Operating System: Arch Linux, Kernel 5.15.13 Qt: 6.2.2 libtorrent-rasterbar: 1.2.15

What is the problem?

On version 4.4.0, my system theme isn't respected. I have QT_QPA_PLATFORMTHEME=qt5ct set, and my qt5 theme is gtk2. My gtk theme is Arc Dark.

Steps to reproduce

Upgrade to 4.4.0 and launch. Downgrading to 4.3.9 fixes the problem.

Additional context

Screenshot on 4.3.9: image

Screenshot on 4.4.0: image

Log(s) & preferences file(s)

No response

glassez commented 2 years ago

@jagannatharjun, can you take a look?

thalieht commented 2 years ago

Qt: 5.15.2

Are you sure about that? Check qBt's "About" to make sure.

mkrasnitski commented 2 years ago

Whoops, turns out it's 6.2.2. What should I do to have qt6 use my gtk theme, while at the same time maintaining qt5's theme as well?

thalieht commented 2 years ago

What should I do to have qt6 use my gtk theme

Don't know, sorry.

sledgehammer999 commented 2 years ago

What should I do to have qt6 use my gtk theme, while at the same time maintaining qt5's theme as well?

FYI, my AppImage which uses qt6 automatically sets QT_QPA_PLATFORMTHEME=gtk3. I think it will work with qt5 too.

Kolcha commented 2 years ago

gtk3 plugin doesn't provide theme support as it was with gtk2, sorry. so that's why since ~Qt 5.8 (gtk2 plugin was dropped in Qt 5.7) qt5ct was actively adopted by different distros, just suitable configs were created to mimic some GTK theme. I don't know what to do with Qt6 and what it (and third-party plugins) provides for theming. I'll not be surprised if no options there, because no one care about uniform look nowadays... and any customization options are considered "unwanted or even dangerous" because any option is considered as source of bugs: no options - no bugs. degradation is modern trend, and unfortunately Linux world is not an exception... sorry for little-bit offtopic.

ghost commented 2 years ago

After the update (4.4.0), gtk themes are not working.

OS: Arch Linux GTK Theme: Orchis-Red-Dark

I tried QT_QPA_PLATFORMTHEME='gtk2', 'gtk3, 'gnome', 'qt5ct' --> Nothing works, qbittorrent still uses default light theme.

Alternatively, using QT_QPA_PLATFORMTHEME='qt6ct' & using custom darker theme in qt6ct, gtk themes not showing in qt6ct.

qt6ct

sledgehammer999 commented 2 years ago

What happens if you use the official AppImage?

bacteriostat commented 2 years ago

I am facing the same issue on Arch Linux. The reason it is more pronounced on Arch is because the packaged version only depends on qt6 and drops qt5 completely. There is a new AUR package qbittorrent-qt5 which should fix the problem for now.

I am running KDE Plasma with Breeze theme and it does not support qt6 yet. Best solution would be to force GTK theme but that does not seem to work as mentioned by @o2g3n.

xfzv commented 2 years ago

Same here on Arch Linux and KDE Plasma.

@bacteriostat is right, this is because 4.40 and beyond now depend on qt6 and it breaks the theme. Thank you for mentioning qbittorrent-qt5 AUR.

cheezymousehouse825 commented 2 years ago

I haven't tried to see if this works yet, but the arch wiki has made an entry on this: https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications#QGtkStyle

Read the qt6 one

Edit: According to @o2g3n this solution does not work, sorry for your inconvenience. This fix might work in future updates

bacteriostat commented 2 years ago

Thanks @cheezymousehouse825 for pointing this out, it definitely works but for some reason it applies light theme with light icons. image

As suggested in Wiki, I used gtk-theme-switch2 and tried out Adwaita, Adwaita-dark, Breeze, Breeze-dark. All of them look broken except Breeze. I am sticking to it. This is how it looks:

image

Dnkhatri commented 2 years ago

What happens if you use the official AppImage?

The default OS theme does not work on linux mint with the Appimage

tarkh commented 2 years ago

Same here, Arch Linux 5.15.13, dark theme disappeared after update. I can enable system theme with qt6ct by pressing Apply button, but only if qBittorrent already running. If then I restart it, theme resets again.

qrrk commented 2 years ago

Same here on Arch (KDE, Breeze Dark).

4.3.9:

4.4.0:

The AUR package qbittorrent-qt5 fixes the issue, thanks, @bacteriostat !

sledgehammer999 commented 2 years ago

I have been experimenting with the AppImage and the Qt platformtheme/style plugins. Here is a test AppImage using the qt6gtk2 platformtheme+style plugins. You must have gtk2 installed for it work. You also must have selected a gtk2 compatible theme. (most of the themes are gtk2 compatible anyway). Let me know if it works. I have tested it on Ubuntu 20.04 and Debian Unstable (sid).

The AppImage: http://builds.shiki.hu/temp/qbittorrent-4.4.0_x86_64_with_qt6gtk2.AppImage The gpg sig: http://builds.shiki.hu/temp/qbittorrent-4.4.0_x86_64_with_qt6gtk2.AppImage.asc

mozo78 commented 2 years ago

It doesn't run at all on my end and it gives no errors.

sledgehammer999 commented 2 years ago

It doesn't run at all on my end and it gives no errors.

What is your OS and DE?

Can you run it like this:

QT_DEBUG_PLUGINS=1 ./qbittorrent-4.4.0_x86_64_with_qt6gtk2.AppImage

and paste the output?

mozo78 commented 2 years ago

It's not giving any output: Screenshot_20220116_010828

sledgehammer999 commented 2 years ago

@mozo78 what OS and DE is used?

sledgehammer999 commented 2 years ago

It's very weird that no output is written with that env var set.

mozo78 commented 2 years ago

I'm on Arch with KDE Plasma :)

sledgehammer999 commented 2 years ago

KDE Plasma :)

Then it won't load the qt6gtk2 platformtheme plugin. It will only load it for DEs based on Gtk. But still, it doesn't explain why it doesn't launch at all.

mozo78 commented 2 years ago

I don't know, I'm sorry :(

ghost commented 2 years ago

System theme support has been dropped on 4.5.0.