[UI] avoid "jumping around" if window was resized

* resizing in frameless is subject of QSizeGrip in the status bar
* also make sure resize grip is always aligned to the right QSizePolicy::MinimumExpanding
* the last point still still happens (resize button centered) for an unknown reason
This commit is contained in:
Klaus Basan
2019-11-03 04:22:15 +01:00
committed by Mat Sutcliffe
parent d8ec308a3b
commit 516a7063e5
3 changed files with 16 additions and 3 deletions

View File

@@ -16,6 +16,7 @@
#include <QByteArray>
#include <QPoint>
#include <QString>
#include <QSize>
#include <Qt>
class QEvent;
@@ -88,6 +89,7 @@ namespace BlackGui
protected:
QPoint m_framelessDragPosition; //!< position, if moving is handled with frameless window
QSize m_moveSize; //!< size when moved (in frameless window)
QPushButton *m_framelessCloseButton = nullptr; //!< close button
WindowMode m_windowMode = WindowNormal; //!< Window mode, \sa WindowMode
WindowMode m_originalWindowMode = WindowNormal; //!< mode when initialized