Page MenuHomePhabricator

[electrum] fix style for master pubkey widget in proof editor
ClosedPublic

Authored by PiRK on Oct 8 2025, 10:43.

Details

Summary

The previous stylesheet hack used to denote that the master pubkey widget is read-only makes the text unreadable in dark mode.
We could try to find a selection of background color and text color that works with each theme, but this is complex as there are actually 3 themes to handle:

  • the white theme, used when the user selects the "default" theme and the OS is using a light theme
  • the custom dark scheme used when the "dark" is selected in the options
  • the OS dark theme used when "default" is selected and the OS theme is set to dark (works with qt6 only on my computer)

Another option would be to set the widget as disabled, which imo looks readable with all color themes, but then I would need to fight Qt with another hack to make the text selectable, and fight the existing codebase to keep the overlay "Copy" button enabled when its parent line edit is disabled.

Instead, just remove the border from the widget so it looks less like an editable text widget.

Test Plan

Open a proof editor with Qt5 and Qt6 (QT_API=qt6 ./electrum-abc), with both themes selected in the Tools > Preferences > General > Color Theme menu options.
Check that the pubkey is readable.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avaproof_improvements
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34734
Build 68932: Build Diffelectrum-functional-tests · electrum-tests
Build 68931: arc lint + arc unit

Event Timeline

PiRK requested review of this revision.Oct 8 2025, 10:43
PiRK edited the summary of this revision. (Show Details)

another alternative is to use a label rather than a QLineEdit, but then we lose the convenient "copy to clipboard" button

This revision is now accepted and ready to land.Oct 8 2025, 11:40