fix: QuickSwitcherPopup now pops up in the selected window (#4819)
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user