1
0

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

regression from e362d1aac4
This commit is contained in:
SomberNight
2022-05-20 18:26:30 +02:00
parent 57ec9612cb
commit a0b7782e6d
3 changed files with 5 additions and 3 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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)