diff options
author | Zhang Hao <zhanghao@uniontech.com> | 2021-03-11 08:52:13 +0800 |
---|---|---|
committer | Zhang Hao <zhanghao@uniontech.com> | 2021-03-24 00:54:02 +0000 |
commit | be643a27f44caa67fa34f10a7b7061a841feb943 (patch) | |
tree | 394ebe8b7c1d402b4977249ab5086094828d253f /src/gui | |
parent | 2db455aff4ed925add61a5048f40f83696afafc8 (diff) |
Account for multiple screens when computing QSizeGrip available geometry
In a multi-screen setup, when the window was resized on one
of the screens, the resize was limited to the available geometry
of the screen the window was on.
Fix this by using the whole virtual geometry of all the screens
as basis for the resize.
Fixes: QTBUG-91714
Change-Id: I28dd241d73f6a68550af88e368f0dbdcb9ebf42b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qplatformtheme.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qplatformtheme.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp index 5de1c98127..34f7307cd7 100644 --- a/src/gui/kernel/qplatformtheme.cpp +++ b/src/gui/kernel/qplatformtheme.cpp @@ -163,6 +163,10 @@ QT_BEGIN_NAMESPACE \value ShowShortcutsInContextMenus (bool) Whether to display shortcut key sequences in context menus. + \value InteractiveResizeAcrossScreens (bool) Whether using the whole virtual geometry of all the screens + as basis for the resize. + This enum value has been added in Qt 6.2. + \sa themeHint(), QStyle::pixelMetric() */ @@ -563,6 +567,8 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint) } case MouseQuickSelectionThreshold: return QVariant(10); + case InteractiveResizeAcrossScreens: + return true; } return QVariant(); } diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h index d736948969..0b6c0254f0 100644 --- a/src/gui/kernel/qplatformtheme.h +++ b/src/gui/kernel/qplatformtheme.h @@ -117,7 +117,8 @@ public: TouchDoubleTapDistance, ShowShortcutsInContextMenus, IconFallbackSearchPaths, - MouseQuickSelectionThreshold + MouseQuickSelectionThreshold, + InteractiveResizeAcrossScreens, }; enum DialogType { |