spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.23k stars 3.03k forks source link

Black on black in Linux #8938

Open asdf23 opened 3 months ago

asdf23 commented 3 months ago

I'm using a dark theme on my OS (Fedora Wayland Gnome) What I'm seeing: image

What I'm not seeing: image

Seeing: image

Not seeing: image

asdf23 commented 3 months ago

Seeing: image

Not seeing: image

asdf23 commented 3 months ago

This Stackoverflow aticle might be helpful: https://stackoverflow.com/questions/74991889/how-to-handle-system-dark-mode-in-qml

tldr; There are styles in QtQuick that are system theme aware by default. Material.theme: Material.System

Reference: https://doc.qt.io/qt-6/qtquickcontrols-material.html#material-theme-attached-prop

Possible bug found here: electrum/gui/qml/components/main.qml

....snip....
ApplicationWindow
{
    id: app

    visible: false // initial value

    // dimensions ignored on android
    width: 480
    height: 800

    Material.theme: Material.Dark                <---- can this be a variable or just not hard-coded ?
    Material.primary: Material.Indigo
    Material.accent: Material.LightBlue
    font.pixelSize: constants.fontSizeMedium
....snip....
ecdsa commented 3 months ago

The above file is for the QML GUI, which differs from the Qt GUI. The screenshots you are showing are for the Qt GUI.

asdf23 commented 3 months ago

I'm not super familar with Qt/QML just did a quick check trying to help out. It does make the app unusable.

asdf23 commented 3 months ago

Launching the program with this works: Exec=env GTK_THEME=adwaita:light QT_STYLE_OVERRIDE=Adwaita electrum

asdf23 commented 3 months ago

Or this desktop shortcut:

~/Desktop/electrum.desktop :

[Desktop Entry]
Comment=Lightweight Bitcoin Client
Exec=electrum %u
GenericName[en_US]=Bitcoin Wallet
GenericName=Bitcoin Wallet
Icon=electrum
Name[en_US]=Electrum Bitcoin Wallet
Name=Electrum Bitcoin Wallet
Categories=Finance;Network;
StartupNotify=true
Exec=env GTK_THEME=adwaita:light QT_STYLE_OVERRIDE=Adwaita electrum
Terminal=false
Type=Application
MimeType=x-scheme-handler/bitcoin;x-scheme-handler/lightning;
Actions=Testnet;

[Desktop Action Testnet]
Exec=electrum --testnet %u
Name=Testnet mode