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>
This commit is contained in:
parent
1373a20f99
commit
59f8da17e6
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user