keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.71k stars 1.43k forks source link

KDE: File dialogs have wrong icons and color theme #5593

Open medmedin2014 opened 3 years ago

medmedin2014 commented 3 years ago

When I set the app to use native theme (which is dark breeze theme) I get bad icons on database selector. Is there no way to use the dark breeze icons inside the app because the shipped icons look ugly.

keepassxc : 2.6.1
Operating System: Manjaro Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel Version: 5.4.72-1-MANJARO
OS Type: 64-bit

Screenshot_20201023_111910

medmedin2014 commented 3 years ago

The keepassxc dark theme has same trouble Screenshot_20201023_112452

droidmonkey commented 3 years ago

Looks like a theme issue on your end since they are dark even when using classic theme (which is qt default). Plus we dont provide those icons at all, they are provided by your desktop env.

medmedin2014 commented 3 years ago

@droidmonkey No, it's not KDE theme problem, here are some comparaisons Screenshot_20201023_115210 Screenshot_20201023_115308

medmedin2014 commented 3 years ago

@droidmonkey It seems keepassxc picks the light icons theme instead of the dark one.

droidmonkey commented 3 years ago

We don't own the file open dialog. You'll have to take this up with qt

droidmonkey commented 3 years ago

Perhaps there is some obscure function call to declare the theme as "dark". Still does not explain why is broken with classic theme, that is pure qt.

medmedin2014 commented 3 years ago

@droidmonkey Apart from file selector, there other icons issues using native kde theme image12 gg tt

droidmonkey commented 3 years ago

Yah those are qt injected icons

phoerious commented 3 years ago

I fixed the icon issue in dialogues a while ago by using the system theme as fallback. Perhaps the theme is not complete.

medmedin2014 commented 3 years ago

@phoerious KDE dark breeze icons appears correclty on other qt/gtk apps.

iyanmv commented 3 years ago

I recently did a fresh installation of Archlinux with Plasma. Before I never run into this issue, but now it happens to me every time. Going to icons configuration, switching to Breeze and then back to Breeze dark seems to fix the issue. But only temporarily. Any ideas?

DMyachin commented 3 years ago

I have same problem in Arch with Plasma

medmedin2014 commented 3 years ago

Still the same problem with Plasma 5.21.5, both GTK and Qt apps pick the correct icons, only KeepassXC doesn't

text843

iyanmv commented 3 years ago

Yep, I only notice this issue whenever I do a fresh installation and I have to open the database for the first time, but it's still there. And I wouldn't say is a Plasma/Qt bug since KeePassXC is literally the only app where I observe this.

iyanmv commented 3 years ago

Yah those are qt injected icons

Are you sure? I don't think so...

droidmonkey commented 1 year ago

I have tested KDE extensively with various themes and it looks fine in newer versions. Closing this.

medmedin2014 commented 1 year ago

@droidmonkey I still have the problem with Dark and Classic (platform-native) themes on:

KeePassXC: 2.7.6
Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.4.11-2-MANJARO (64-bit)
Graphics Platform: Wayland

https://i.imgur.com/fGwRPRk.png

droidmonkey commented 1 year ago

image

image

image

Using flatpak distribution, both dark and classic theme work fine. We are not going to invest any more time in trying to solve this for specific configurations.

medmedin2014 commented 1 year ago

@droidmonkey I'm using the native version and not the flatpak one, and it seems in your screenshot KeePassXC uses the KDE portal like it was not a pure Qt app, the portal dialogs are only used by GTK apps to force them use Qt dialogs instead of using GTK ones.

medmedin2014 commented 1 year ago

@droidmonkey A flatpak is not the perfect distribution package for testing, because like snaps it's just a specific type of packaging forced by Fedora on its own distribution.

droidmonkey commented 1 year ago

Flatpak is a great means to test because you can control more variables using Flatpak which makes it a superior distribution method across Linux distributions. I do recommend you switch to flatpak to solve this problem immediately.

I was able to reproduce with native build:

image

medmedin2014 commented 1 year ago

@droidmonkey Flatpaks and snaps have long history of slow performance, weird behaviors and difficulties to match their looks to the global applied theme, so many hacks are added to their configurations to fix those unnecessary problems. For me, it's recommended to avoid them for any rigorous testing.

nicolasfella commented 3 months ago

The problem here is the call to QIcon::setThemeName("application"). By setting a non-default icon theme Qt will stop using the platform's native icon engine (https://codebrowser.dev/qt5/qtbase/src/gui/image/qicon.cpp.html#1312).

Plasma's icon engine is what makes the icons have the correct colors when using a dark color scheme