Browse Source

Qt addr/utxo lists: in dark theme, fix item bgcolor (was pure black)

regression from e362d1aac4
patch-4
SomberNight 3 years ago
parent
commit
a0b7782e6d
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 4
      electrum/gui/qt/address_list.py
  2. 2
      electrum/gui/qt/util.py
  3. 2
      electrum/gui/qt/utxo_list.py

4
electrum/gui/qt/address_list.py

@ -236,8 +236,8 @@ class AddressList(MyTreeView):
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

2
electrum/gui/qt/util.py

@ -592,6 +592,8 @@ class MyTreeView(QTreeView):
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)

2
electrum/gui/qt/utxo_list.py

@ -125,7 +125,7 @@ class UTXOList(MyTreeView):
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)

Loading…
Cancel
Save