From 034bb19c6a5f6860cec5c745b623f391247a4e24 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Sun, 15 Dec 2024 06:00:15 +0200 Subject: [PATCH 1/3] Set focus policy for NetworkStatus.tableWidgetConnectionCount --- src/bitmessageqt/networkstatus.ui | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bitmessageqt/networkstatus.ui b/src/bitmessageqt/networkstatus.ui index e0c01b57..35931e23 100644 --- a/src/bitmessageqt/networkstatus.ui +++ b/src/bitmessageqt/networkstatus.ui @@ -78,6 +78,8 @@ + + Qt::NoFocus QFrame::Box -- 2.45.1 From 866920e60b1c7b5951d6d33da10ca11ced473811 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Mon, 23 Dec 2024 04:22:44 +0200 Subject: [PATCH 2/3] Set black foreground for colored items in the Network Status connections table --- src/bitmessageqt/networkstatus.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bitmessageqt/networkstatus.py b/src/bitmessageqt/networkstatus.py index 5d669f39..79ea415c 100644 --- a/src/bitmessageqt/networkstatus.py +++ b/src/bitmessageqt/networkstatus.py @@ -192,12 +192,13 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin): 0, 1, QtGui.QTableWidgetItem("%s" % (rating)) ) - if outbound: - brush = QtGui.QBrush(QtGui.QColor("yellow"), QtCore.Qt.SolidPattern) - else: - brush = QtGui.QBrush(QtGui.QColor("green"), QtCore.Qt.SolidPattern) + brush = QtGui.QBrush( + QtGui.QColor("yellow" if outbound else "green"), + QtCore.Qt.SolidPattern) for j in range(1): self.tableWidgetConnectionCount.item(0, j).setBackground(brush) + self.tableWidgetConnectionCount.item(0, j).setForeground( + QtGui.QBrush(QtGui.QColor("black"), QtCore.Qt.SolidPattern)) self.tableWidgetConnectionCount.item(0, 0).setData(QtCore.Qt.UserRole, destination) self.tableWidgetConnectionCount.item(0, 1).setData(QtCore.Qt.UserRole, outbound) else: -- 2.45.1 From f497d7ab51905e32cfe05e0daf2b01e29ac54ffc Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Tue, 21 May 2024 22:21:28 +0300 Subject: [PATCH 3/3] Remove palette property from the STableWidget and set background to Button role - should be the same as in TabWidget. --- src/bitmessageqt/networkstatus.ui | 43 +++++-------------------------- 1 file changed, 7 insertions(+), 36 deletions(-) diff --git a/src/bitmessageqt/networkstatus.ui b/src/bitmessageqt/networkstatus.ui index 35931e23..121d60c5 100644 --- a/src/bitmessageqt/networkstatus.ui +++ b/src/bitmessageqt/networkstatus.ui @@ -16,6 +16,13 @@ 0 + + +STableWidget { + background: palette(Button); +} + + @@ -42,42 +49,6 @@ - - - - - - - 212 - 208 - 200 - - - - - - - - - 212 - 208 - 200 - - - - - - - - - 212 - 208 - 200 - - - - - Qt::NoFocus -- 2.45.1