fixed #177 user popup being off the screen

This commit is contained in:
fourtf
2018-01-22 20:52:32 +01:00
parent fc758846f6
commit 305191d4b3
7 changed files with 69 additions and 47 deletions
+8
View File
@@ -19,6 +19,11 @@ public:
bool hasCustomWindowFrame();
void addTitleBarButton(const QString &text);
void setStayInScreenRect(bool value);
bool getStayInScreenRect() const;
void moveTo(QWidget *widget, QPoint point);
protected:
#ifdef USEWINSDK
virtual void showEvent(QShowEvent *);
@@ -28,13 +33,16 @@ protected:
virtual void changeEvent(QEvent *) override;
virtual void leaveEvent(QEvent *) override;
virtual void resizeEvent(QResizeEvent *) override;
virtual void refreshTheme() override;
private:
void init();
void moveIntoDesktopRect(QWidget *parent);
bool enableCustomFrame;
bool stayInScreenRect = false;
QHBoxLayout *titlebarBox;
QWidget *titleLabel;