persepolisdm / persepolis

Persepolis Download Manager is a GUI for aria2.
https://persepolisdm.github.io
GNU General Public License v3.0
6.19k stars 651 forks source link

Default style not compatible with system Qt5 style #691

Closed ilius closed 1 year ago

ilius commented 4 years ago

System Details:

Issue Description and steps to reproduce: As you can see in the screenshot, the Qt5 theme is changed with "qt5ct" tool (Qt5 Configuration Tool), to a dark theme, and it's already applied on "qt5ct" itself, as well as Okular. But not applied for Persepolis. persepolis-qt5ct-okular

And this is the environment variable that is set for the theme: QT_QPA_PLATFORMTHEME=qt5ct

These are the versions I'm using:

$ python3 --version
Python 3.7.4+

$ apt show python3-pyqt5 | grep Version
Version: 5.12.3+dfsg-2

$ apt show libqt5gui5 | grep Version
Version: 5.11.3+dfsg1-4
ilius commented 4 years ago

Also installed deb package (persepolis_3.2.0.0_all.deb), looks exactly the same.

alireza-amirsamimi commented 4 years ago

Hello :-) Unfortunately persepolis doesn't use system's fusion style. LXDE is GTK+ DE. So I suggest you to install adwaita-qt and select adwaita style from preferences window. Check out this link for more information.

ilius commented 4 years ago

Hi I didn't know I have to change the style form Preferences. It works now (Adwaita-Dark, Fusion and qt5ct-style are all listed BTW).

Also, I changed the Style to "System", and it still works (it has dark theme)

Then I removed ~/.config/persepolis_download_manager, and it's broken again. And the Style is changed to Adwaita. I changed it to "System" again and it's fixed.

I think "System" style should be the default. It should be compatible with desktop by default. Don't you agree?

alireza-amirsamimi commented 4 years ago

@ilius Persepolis uses QSettings for saving user's configuration. In Linux QSettings creates a .conf file in this path:

~/. config/persepolis_download_manager/persepolis.conf

ilius commented 4 years ago

Yes, that's alright.

The only thing that remains is this: I think "System" style should be the default.

alireza-amirsamimi commented 4 years ago

Unfortunately system style is very ugly in some operating systems.

ilius commented 4 years ago

You mean Windows? At least you can set a different default value for Linux.

alireza-amirsamimi commented 4 years ago

@ilius No On Windows and Mac and some of desktop environment on some of linux and BSD distributions, system's style is really ugly!

ilius commented 4 years ago

What do you mean ugly? Ugly in terms of appearance or in terms of code? Most Qt5 applications don't even support customizing the style, and they use the system/desktop style on all Linux distributions. How do they work then?

alireza-amirsamimi commented 4 years ago

See this screenshot. For example in Macintosh and ... system's style is similar to Windows 98

screenshot

ilius commented 4 years ago

I'm not a Qt expert. But ideally we should check if the system has any previous Qt style and configuration. If does not, it means Qt is not system's native, so you can choose your own style. But on Linux, you are not supposed to do that. Ugly or pretty, that's up to user to decide, because Qt is one of the native GUI libraries in Linux. Although I Windows, Qt applications look like native windows apps, not sure what is not that the case for Mac.

alireza-amirsamimi commented 4 years ago

@ilius I'll try to fix it :-)

ilius commented 4 years ago

I have some Linux distros in VM, so I can help testing it.