fix: QuickSwitcherPopup now pops up in the selected window (#4819)

This commit is contained in:
pajlada
2023-09-17 23:52:17 +02:00
committed by GitHub
parent 3265df7661
commit e6df652a4f
6 changed files with 37 additions and 27 deletions
@@ -10,6 +10,7 @@
namespace chatterino {
class GenericListView;
class Window;
class QuickSwitcherPopup : public BasePopup
{
@@ -17,19 +18,19 @@ public:
/**
* @brief Construct a new QuickSwitcherPopup.
*
* @param parent Parent widget of the popup. The popup will be placed
* in the center of the parent widget.
* @param parent Parent window of the popup. The popup will be placed
* in the center of the window.
*/
explicit QuickSwitcherPopup(QWidget *parent = nullptr);
explicit QuickSwitcherPopup(Window *parent);
protected:
virtual void themeChangedEvent() override;
void themeChangedEvent() override;
public slots:
void updateSuggestions(const QString &text);
private:
static const QSize MINIMUM_SIZE;
constexpr static const QSize MINIMUM_SIZE{500, 300};
struct {
QLineEdit *searchEdit{};
@@ -38,6 +39,8 @@ private:
QuickSwitcherModel switcherModel_;
Window *window{};
void initWidgets();
};