You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the qt gui uses qdarkstyle if the "Dark" mode is explicitly enabled by the user. If the "Light" default mode is enabled it is light if the system theme is light too, if the system theme is dark the Electrum theme will be dark on some plattforms (KDE for example) but not on all (on Gnome it will stay light). This is weird because the user expects "Light" to be light and not dynamic. Also the dark "light" mode looks different than the qdarkstyle explicit dark mode, which is also unexpected.
By using the QT Fusion style with app.setStyle("Fusion") we can explicitly set the theme app.styleHints().setColorScheme(Qt.ColorScheme.Dark) or allow for a default config option that changes the theme depending on system theme. This Fusion style should be available for all platforms.
Doing this we can also get rid of the qdarkstyle dependency as the Fusion style provides light and dark styles.
However the setColorScheme() method currently doesn't work on Linux (pyqt 6.8.1 / qt 6.8.2) because it's not implemented for Linux yet. See qt issue https://bugreports.qt.io/browse/QTBUG-129917
Once setColorScheme() is functional on Linux we can do this. I subscribed to the QT issue.
Description
Currently the qt gui uses qdarkstyle if the "Dark" mode is explicitly enabled by the user. If the "Light" default mode is enabled it is light if the system theme is light too, if the system theme is dark the Electrum theme will be dark on some plattforms (KDE for example) but not on all (on Gnome it will stay light). This is weird because the user expects "Light" to be light and not dynamic. Also the dark "light" mode looks different than the qdarkstyle explicit dark mode, which is also unexpected.
By using the QT
Fusion
style withapp.setStyle("Fusion")
we can explicitly set the themeapp.styleHints().setColorScheme(Qt.ColorScheme.Dark)
or allow for a default config option that changes the theme depending on system theme. This Fusion style should be available for all platforms.Doing this we can also get rid of the qdarkstyle dependency as the Fusion style provides light and dark styles.
However the
setColorScheme()
method currently doesn't work on Linux (pyqt 6.8.1 / qt 6.8.2) because it's not implemented for Linux yet. See qt issue https://bugreports.qt.io/browse/QTBUG-129917Once
setColorScheme()
is functional on Linux we can do this. I subscribed to the QT issue.may contain useful info: https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5
The text was updated successfully, but these errors were encountered: