Merge pull request #2693 from casper/gui-history-upgrades
History list - GUI fix + small improvements
This commit is contained in:
commit
1ee41089cf
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue