aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionview.h
diff options
context:
space:
mode:
authorgubatron <gubatron@gmail.com>2014-03-21 01:45:47 -0400
committergubatron <gubatron@gmail.com>2014-03-21 01:45:47 -0400
commit8c29273ff058f90dfa16a30b3d8457b842c0954d (patch)
treed6e52183eb06a512319343373ddc4a11e56b350b /src/qt/transactionview.h
parent6539cfc583c5963fbb3138b99c1a8677970e0305 (diff)
downloadbitcoin-8c29273ff058f90dfa16a30b3d8457b842c0954d.tar.xz
[QT] Fixes feel when resizing the last column on tables (issue #2862)
Re-submitting this pull request with a single commit. This patch introduces a GUIUtil class that is used when setting up the 2 tables we have so far on the Qt-GUI. In the past you could only resize the last column, which has BTC amounts from the right border of the column header, something that was rather unnatural. If a new table were ever to be added to the interface, fixing the last columns resizing behavior is rather simple. Just look at how we initialize here a TableViewLastColumnResizingFixer object when setting up the table header's behavior, and then how we override the resize event of the component (can be the table, or the dialog) and we invoke columnResizingFixer->stretchColumnWidth(columnIndex);
Diffstat (limited to 'src/qt/transactionview.h')
-rw-r--r--src/qt/transactionview.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h
index 18f2b9bfc9..fe8e205d6c 100644
--- a/src/qt/transactionview.h
+++ b/src/qt/transactionview.h
@@ -6,6 +6,7 @@
#define TRANSACTIONVIEW_H
#include <QWidget>
+#include "guiutil.h"
class TransactionFilterProxy;
class WalletModel;
@@ -44,6 +45,14 @@ public:
Range
};
+ enum ColumnWidths {
+ STATUS_COLUMN_WIDTH = 23,
+ DATE_COLUMN_WIDTH = 120,
+ TYPE_COLUMN_WIDTH = 120,
+ AMOUNT_MINIMUM_COLUMN_WIDTH = 120,
+ MINIMUM_COLUMN_WIDTH = 23
+ };
+
private:
WalletModel *model;
TransactionFilterProxy *transactionProxyModel;
@@ -62,6 +71,10 @@ private:
QWidget *createDateRangeWidget();
+ GUIUtil::TableViewLastColumnResizingFixer *columnResizingFixer;
+
+ virtual void resizeEvent(QResizeEvent* event);
+
private slots:
void contextualMenu(const QPoint &);
void dateRangeChanged();