diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-01-31 16:03:18 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-01-31 18:09:30 +0200 |
commit | 3913d1e8c1f604bdd622d5e81e5077ef52b30466 (patch) | |
tree | 9c421dd057fb73ef19442ad9fea417bde6f0438d /src/qt/guiutil.h | |
parent | 4c55f92c7644c267997c7ddab37d195216d6cf39 (diff) | |
download | bitcoin-3913d1e8c1f604bdd622d5e81e5077ef52b30466.tar.xz |
qt: Drop buggy TableViewLastColumnResizingFixer class
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.
Diffstat (limited to 'src/qt/guiutil.h')
-rw-r--r-- | src/qt/guiutil.h | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index edfb5b13a2..63c7c265ed 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); |