Enable resizing the overlayed dock widgets

Fixed WidgetResizeHandler to not allow it to resize the overlay
bigger than its parent

For issue #116

The size isn't remembered though. Next time you open the overlay
it will have the previous size.
This commit is contained in:
Sergio Martins
2020-12-18 17:15:03 +00:00
parent 23b69d4e9e
commit e5809c06c7
3 changed files with 34 additions and 2 deletions

View File

@@ -60,6 +60,19 @@ public:
*/
void setAllowedResizeSides(CursorPositions);
/**
* Sets the resize gap. By default 10.
*
* This is only used for non-top-level (child) widgets.
* When resizing a child widget, it will be clipped by its parent, but we leave a little space so
* we can resize it again.
*
* Meaning, if you're resizing 'bottom' of the child widget, it can never be bigger than parent.geometry().bottom() - gap.
* The gap allows you to put your mouse there and resize again.
*/
void setResizeGap(int);
static int widgetResizeHandlerMargin();
#ifdef Q_OS_WIN
@@ -81,6 +94,7 @@ private:
QPoint mNewPosition;
bool mResizeWidget = false;
const bool mFilterIsGlobal;
int m_resizeGap = 10;
CursorPositions mAllowedResizeSides = CursorPosition_All;
};