ui: Use window decorations on dialog windows (issue #376)
* added SubWindow flag to QtWindow to either use window decorations or show window within main window * fixes black borders in some Linux window managers bug id = 376 fortune cookie message = Your skill will accomplish what the force of many others cannot.
This commit is contained in:
@@ -18,7 +18,7 @@ class QtWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QtWindow(QWidget* parent = nullptr);
|
||||
QtWindow(bool isSubWindow, QWidget* parent = nullptr);
|
||||
|
||||
QSize sizeHint() const override;
|
||||
|
||||
@@ -63,11 +63,12 @@ signals:
|
||||
void previous();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event) Q_DECL_OVERRIDE;
|
||||
void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE;
|
||||
void keyPressEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
|
||||
void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
|
||||
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
|
||||
void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
|
||||
void mouseMoveEvent(QMouseEvent* event) Q_DECL_OVERRIDE;
|
||||
void mousePressEvent(QMouseEvent* event) Q_DECL_OVERRIDE;
|
||||
void mouseReleaseEvent(QMouseEvent* event) Q_DECL_OVERRIDE;
|
||||
|
||||
virtual void populateWindow(QWidget* widget);
|
||||
virtual void windowReady();
|
||||
@@ -80,6 +81,8 @@ protected:
|
||||
void addLogo();
|
||||
QHBoxLayout* createButtons();
|
||||
|
||||
bool m_isSubWindow;
|
||||
|
||||
QWidget* m_window;
|
||||
QWidget* m_content;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user