From 586f592af1207b48fd0c7e66d0d26e381b81cb3d Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 11 Nov 2014 16:03:06 +0100 Subject: [PATCH] invoices: change column order --- gui/qt/main_window.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 379d0c4e7..ce35213c0 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -1354,14 +1354,14 @@ class ElectrumWindow(QMainWindow): def create_invoices_tab(self): - l, w = self.create_list_tab([_('Status'), _('Date'), _('Requestor'), _('Memo'), _('Amount')]) - l.setColumnWidth(0, 60) + l, w = self.create_list_tab([_('Date'), _('Requestor'), _('Memo'), _('Amount'), _('Status')]) + l.setColumnWidth(0, 150) l.setColumnWidth(1, 150) - l.setColumnWidth(2, 150) - l.setColumnWidth(4, 150) + l.setColumnWidth(3, 150) + l.setColumnWidth(4, 40) h = l.header() h.setStretchLastSection(False) - h.setResizeMode(3, QHeaderView.Stretch) + h.setResizeMode(2, QHeaderView.Stretch) l.setContextMenuPolicy(Qt.CustomContextMenu) l.customContextMenuRequested.connect(self.create_invoice_menu) self.invoices_list = l @@ -1376,13 +1376,13 @@ class ElectrumWindow(QMainWindow): if status == PR_UNPAID and expiration_date and expiration_date < time.time(): status = PR_EXPIRED date_str = datetime.datetime.fromtimestamp(expiration_date).isoformat(' ')[:-3] - item = QTreeWidgetItem( [ '', date_str, domain, memo, self.format_amount(amount, whitespaces=True)] ) + item = QTreeWidgetItem( [ date_str, domain, memo, self.format_amount(amount, whitespaces=True), ''] ) icon = QIcon(pr_icons.get(status)) - item.setIcon(0, icon) - item.setToolTip(0, pr_tooltips.get(status,'')) + item.setIcon(4, icon) + item.setToolTip(4, pr_tooltips.get(status,'')) item.setData(0, 32, key) + item.setFont(1, QFont(MONOSPACE_FONT)) item.setFont(2, QFont(MONOSPACE_FONT)) - item.setFont(3, QFont(MONOSPACE_FONT)) l.addTopLevelItem(item) l.setCurrentItem(l.topLevelItem(0))