aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-02-22 08:13:39 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-02-22 08:13:51 +0100
commitfd725c2d795a1df0f3a21d9c9e8b3cf3183bd9bc (patch)
tree49d593669d234fd96aa4548062e5176efbb51526 /src/qt/guiutil.h
parent8d7d5f257b384d661dd5aaeab81ffd1ee09f99cd (diff)
parent3913d1e8c1f604bdd622d5e81e5077ef52b30466 (diff)
downloadbitcoin-fd725c2d795a1df0f3a21d9c9e8b3cf3183bd9bc.tar.xz
Merge bitcoin-core/gui#204: Drop buggy TableViewLastColumnResizingFixer class
3913d1e8c1f604bdd622d5e81e5077ef52b30466 qt: Drop buggy TableViewLastColumnResizingFixer class (Hennadii Stepanov) Pull request description: In Qt 5 the last column resizing with dragging its left edge works out-of-the-box. The current `TableViewLastColumnResizingFixer` implementation could put the last column content out of the view port and confuse a user: ![Screenshot from 2021-01-31 18-04-32](https://user-images.githubusercontent.com/32963518/106390022-fd6bd180-63ee-11eb-9216-6e5117f8dc96.png) Historical context: - https://github.com/bitcoin/bitcoin/pull/2862 - https://github.com/bitcoin/bitcoin/pull/3626 - https://github.com/bitcoin/bitcoin/pull/3738 - https://github.com/bitcoin/bitcoin/pull/3920 #205 is a nice addition. ACKs for top commit: jarolrod: ACK 3913d1e8c1f604bdd622d5e81e5077ef52b30466, tested on macOS 11.1 Qt 5.15.2 Talkless: tACK 3913d1e8c1f604bdd622d5e81e5077ef52b30466, tested on Debian Sid. Can confirm that behavior in previous commit does not produce scroll bar, last column gets "hidden". This PR makes clear that there's more to see in the view. promag: Tested ACK 3913d1e8c1f604bdd622d5e81e5077ef52b30466 on macos. Tree-SHA512: 12582dfce54bb1db3d9934ae092e305d32e9760cc99b0265322e161fa7f54b7d6fb6cefedf700783f767d5c3a56a8545c8d2f5ade66596c4e67b8a5287063e8a
Diffstat (limited to 'src/qt/guiutil.h')
-rw-r--r--src/qt/guiutil.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index a671e830f1..3134c98429 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -181,45 +181,6 @@ namespace GUIUtil
bool eventFilter(QObject* watched, QEvent* event) override;
};
- /**
- * Makes a QTableView last column feel as if it was being resized from its left border.
- * Also makes sure the column widths are never larger than the table's viewport.
- * In Qt, all columns are resizable from the right, but it's not intuitive resizing the last column from the right.
- * Usually our second to last columns behave as if stretched, and when on stretch mode, columns aren't resizable
- * interactively or programmatically.
- *
- * This helper object takes care of this issue.
- *
- */
- class TableViewLastColumnResizingFixer: public QObject
- {
- Q_OBJECT
-
- public:
- TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth, QObject *parent);
- void stretchColumnWidth(int column);
-
- private:
- QTableView* tableView;
- int lastColumnMinimumWidth;
- int allColumnsMinimumWidth;
- int lastColumnIndex;
- int columnCount;
- int secondToLastColumnIndex;
-
- void adjustTableColumnsWidth();
- int getAvailableWidthForColumn(int column);
- int getColumnsWidth();
- void connectViewHeadersSignals();
- void disconnectViewHeadersSignals();
- void setViewHeaderResizeMode(int logicalIndex, QHeaderView::ResizeMode resizeMode);
- void resizeColumn(int nColumnIndex, int width);
-
- private Q_SLOTS:
- void on_sectionResized(int logicalIndex, int oldSize, int newSize);
- void on_geometriesChanged();
- };
-
bool GetStartOnSystemStartup();
bool SetStartOnSystemStartup(bool fAutoStart);