From 713c3c7460f99f07004ac6179dacea600c0af84c Mon Sep 17 00:00:00 2001 From: Casper Date: Sat, 5 Aug 2017 11:19:29 +0300 Subject: [PATCH] History list upgrades + add icon tooltip + fix text alignment + add double click for details --- gui/qt/history_list.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gui/qt/history_list.py b/gui/qt/history_list.py index f36cea9c..da043698 100644 --- a/gui/qt/history_list.py +++ b/gui/qt/history_list.py @@ -92,6 +92,7 @@ class HistoryList(MyTreeWidget): entry.append(text) item = QTreeWidgetItem(entry) item.setIcon(0, icon) + item.setToolTip(0, str(conf) + " confirmation" + ("s" if conf != 1 else "")) if has_invoice: item.setIcon(3, QIcon(":icons/seal")) for i in range(len(entry)): @@ -99,6 +100,7 @@ class HistoryList(MyTreeWidget): item.setTextAlignment(i, Qt.AlignRight) if i!=2: item.setFont(i, QFont(MONOSPACE_FONT)) + item.setTextAlignment(i, Qt.AlignVCenter) if value < 0: item.setForeground(3, QBrush(QColor("#BC1E1E"))) item.setForeground(4, QBrush(QColor("#BC1E1E"))) @@ -108,6 +110,14 @@ class HistoryList(MyTreeWidget): if current_tx == tx_hash: self.setCurrentItem(item) + def on_doubleclick(self, item, column): + if self.permit_edit(item, column): + super(HistoryList, self).on_doubleclick(item, column) + else: + tx_hash = str(item.data(0, Qt.UserRole).toString()) + tx = self.wallet.transactions.get(tx_hash) + self.parent.show_transaction(tx) + def update_labels(self): root = self.invisibleRootItem() child_count = root.childCount()