tright align numerical values in history widget - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 533cdde366f95038821ca1fe1f31c4b3a34fae8f DIR parent 88077808d92faa2bc4e07451be01b0bcf0964ac7 HTML Author: ThomasV <thomasv@electrum.org> Date: Tue, 8 Sep 2015 12:09:22 +0200 right align numerical values in history widget Diffstat: M gui/qt/history_widget.py | 2 ++ M gui/qt/util.py | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) --- DIR diff --git a/gui/qt/history_widget.py b/gui/qt/history_widget.py t@@ -75,6 +75,8 @@ class HistoryWidget(MyTreeWidget): item = EditableItem(entry) item.setIcon(0, icon) for i in range(len(entry)): + if i>3: + item.setTextAlignment(i, Qt.AlignRight) if i!=2: item.setFont(i, QFont(MONOSPACE_FONT)) if value < 0: DIR diff --git a/gui/qt/util.py b/gui/qt/util.py t@@ -328,10 +328,8 @@ class MyTreeWidget(QTreeWidget): self.setHeaderLabels(headers) self.header().setStretchLastSection(False) for col in range(len(headers)): - if col == self.stretch_column: - self.header().setResizeMode(col, QHeaderView.Stretch) - else: - self.header().setResizeMode(col, QHeaderView.ResizeToContents) + sm = QHeaderView.Stretch if col == self.stretch_column else QHeaderView.ResizeToContents + self.header().setResizeMode(col, sm) def on_activated(self, item): if not item: