From 0a12b0570f3fbb8343f0dd17f34ac988e542229e Mon Sep 17 00:00:00 2001 From: bkkcoins Date: Sun, 13 Jan 2013 11:52:03 +0700 Subject: [PATCH] make tx details scrollable --- lib/gui_qt.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/gui_qt.py b/lib/gui_qt.py index 8978a93a6..5d26c152d 100644 --- a/lib/gui_qt.py +++ b/lib/gui_qt.py @@ -459,9 +459,28 @@ class ElectrumWindow(QMainWindow): def tx_details(self, tx_hash): - tx_details = self.wallet.get_tx_details(tx_hash) - QMessageBox.information(self, 'Details', tx_details, 'OK') + dialog = QDialog(None) + dialog.setModal(1) + dialog.setWindowTitle(_("Transaction Details")) + main_text = QTextEdit() + main_text.setText(self.wallet.get_tx_details(tx_hash)) + main_text.setReadOnly(True) + main_text.setMinimumSize(550,275) + + ok_button = QPushButton(_("OK")) + ok_button.setDefault(True) + ok_button.clicked.connect(dialog.accept) + + hbox = QHBoxLayout() + hbox.addStretch(1) + hbox.addWidget(ok_button) + + vbox = QVBoxLayout() + vbox.addWidget(main_text) + vbox.addLayout(hbox) + dialog.setLayout(vbox) + dialog.exec_() def tx_label_clicked(self, item, column): if column==2 and item.isSelected():