summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorYuhang Zhao <2546789017@qq.com>2022-12-06 10:28:31 +0800
committerYuhang Zhao <yuhangzhao@deepin.org>2023-05-06 06:21:52 +0000
commit59f8da17e6a2989b072254970d23281301114503 (patch)
treec55790228c25cedeaad0d022fe8bdebb68505ea9 /src/widgets
parent1373a20f9998d66e8a928628f568b54e8ac8d1ed (diff)
QWizard: Win: fix wrong frame size and title bar size
The frame size is resize border size + padded border size [1], so our current calculation is not correct, and thus the title bar size is also wrong. [1] We also use this calculation in the Windows QPA, and it's also widely used by many open-source repositories, including Microsoft's own products. Change-Id: I5a4c1f91a31a22cade6227131659a6de73bb6808 Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dialogs/qwizard_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp
index b7788061f1..34708c3e8d 100644
--- a/src/widgets/dialogs/qwizard_win.cpp
+++ b/src/widgets/dialogs/qwizard_win.cpp
@@ -589,7 +589,7 @@ void QVistaHelper::drawBlackRect(const QRect &rect, HDC hdc)
int QVistaHelper::frameSizeDp()
{
- return GetSystemMetrics(SM_CYSIZEFRAME);
+ return GetSystemMetrics(SM_CXSIZEFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER);
}
int QVistaHelper::captionSizeDp()