Skip to content

Commit

Permalink
Qt addr/utxo lists: in dark theme, fix item bgcolor (was pure black)
Browse files Browse the repository at this point in the history
regression from e362d1a
  • Loading branch information
SomberNight committed May 20, 2022
1 parent 57ec961 commit a0b7782
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions electrum/gui/qt/address_list.py
Expand Up @@ -236,8 +236,8 @@ def refresh_row(self, key, row):
address_item[self.Columns.COIN_BALANCE].setData(balance, self.ROLE_SORT_ORDER)
address_item[self.Columns.FIAT_BALANCE].setText(fiat_balance_str)
address_item[self.Columns.NUM_TXS].setText("%d"%num)
c = ColorScheme.BLUE if self.wallet.is_frozen_address(address) else ColorScheme.DEFAULT
address_item[self.Columns.ADDRESS].setBackground(c.as_color(True))
c = ColorScheme.BLUE.as_color(True) if self.wallet.is_frozen_address(address) else self._default_bg_brush
address_item[self.Columns.ADDRESS].setBackground(c)

def create_menu(self, position):
from electrum.wallet import Multisig_Wallet
Expand Down
2 changes: 2 additions & 0 deletions electrum/gui/qt/util.py
Expand Up @@ -592,6 +592,8 @@ def __init__(self, parent: 'ElectrumWindow', create_menu, *,
self._pending_update = False
self._forced_update = False

self._default_bg_brush = QStandardItem().background()

def set_editability(self, items):
for idx, i in enumerate(items):
i.setEditable(idx in self.editable_columns)
Expand Down
2 changes: 1 addition & 1 deletion electrum/gui/qt/utxo_list.py
Expand Up @@ -125,7 +125,7 @@ def refresh_row(self, key, row):
color = ColorScheme.GREEN.as_color(True)
else:
tooltip = key
color = ColorScheme.DEFAULT.as_color(True)
color = self._default_bg_brush
for col in utxo_item:
col.setBackground(color)
col.setToolTip(tooltip)
Expand Down

0 comments on commit a0b7782

Please sign in to comment.