From 3e1e30e4c2c354c527ae52667ece134f1d433ba4 Mon Sep 17 00:00:00 2001 From: xel86 Date: Sat, 28 May 2022 06:25:58 -0400 Subject: [PATCH] Add scrollbar to `Select filters` dialog (#3737) Co-authored-by: pajlada --- CHANGELOG.md | 1 + src/widgets/dialogs/SelectChannelFiltersDialog.cpp | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 720014b34..6ab30cecf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Minor: Fixed tag parsing for consecutive escaped characters. (#3711) - Minor: Prevent user from entering incorrect characters in Live Notifications channels list. (#3715, #3730) - Minor: Fixed automod caught message notice appearing twice for mods. (#3717) +- Minor: Add scrollbar to `Select filters` dialog. (#3737) - Minor: Added `/requests` command. Usage: `/requests [channel]`. Opens the channel points requests queue for the provided channel or the current channel if no input is provided. (#3746) - Minor: Added ability to execute commands on chat messages using the message context menu. (#3738) - Minor: Added `/copy` command. Usage: `/copy `. Copies provided text to clipboard - can be useful with custom commands. (#3763) diff --git a/src/widgets/dialogs/SelectChannelFiltersDialog.cpp b/src/widgets/dialogs/SelectChannelFiltersDialog.cpp index 2421d8bd8..1cf7d75ef 100644 --- a/src/widgets/dialogs/SelectChannelFiltersDialog.cpp +++ b/src/widgets/dialogs/SelectChannelFiltersDialog.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace chatterino { @@ -19,7 +20,15 @@ SelectChannelFiltersDialog::SelectChannelFiltersDialog( auto okButton = new QPushButton("Ok"); auto cancelButton = new QPushButton("Cancel"); - vbox->addLayout(itemVbox); + auto scrollAreaContent = new QWidget; + scrollAreaContent->setLayout(itemVbox); + + auto scrollArea = new QScrollArea; + scrollArea->setWidgetResizable(true); + scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + scrollArea->setWidget(scrollAreaContent); + + vbox->addWidget(scrollArea); vbox->addLayout(buttonBox); buttonBox->addStretch(1);