diff options
| author | Al <gabriel.cortesi@outlook.com> | 2019-01-03 01:35:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-03 01:35:13 +0100 |
| commit | 474fdca3947d37863a31771ca0e67ea34515d6d1 (patch) | |
| tree | 9408f5a3cc4fe50853f5703c26f894629ca203fa /src/downloadlistwidget.h | |
| parent | 683d17784b026d857732a8d52bc26709ba0e0322 (diff) | |
| parent | c54bc7edfac52a26ede7c97b9866e545c2f31194 (diff) | |
Merge pull request #610 from przester/download-tab
Tweak download tab column resizing
Diffstat (limited to 'src/downloadlistwidget.h')
| -rw-r--r-- | src/downloadlistwidget.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/downloadlistwidget.h b/src/downloadlistwidget.h index 0002e2b4..4776d259 100644 --- a/src/downloadlistwidget.h +++ b/src/downloadlistwidget.h @@ -28,6 +28,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QLabel>
#include <QProgressBar>
#include <QTreeView>
+#include <QHeaderView>
#include <QStyledItemDelegate>
@@ -50,6 +51,18 @@ private: DownloadListSortProxy *m_SortProxy;
};
+class DownloadListHeader : public QHeaderView
+{
+ Q_OBJECT
+
+public:
+ explicit DownloadListHeader(Qt::Orientation orientation, QWidget *parent = nullptr) : QHeaderView(orientation, parent) {}
+ void customResizeSections();
+
+private:
+ void mouseReleaseEvent(QMouseEvent *event) override;
+};
+
class DownloadListWidget : public QTreeView
{
Q_OBJECT
@@ -101,6 +114,8 @@ private: DownloadManager *m_Manager;
DownloadList *m_SourceModel = 0;
int m_ContextRow;
+
+ void resizeEvent(QResizeEvent *event);
};
#endif // DOWNLOADLISTWIDGET_H
|
