From c1321458457350a2e085a0ea83ebcf1f0b648507 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Fri, 31 Aug 2012 10:30:48 +0200 Subject: [PATCH] Checkbox width is calculated wrong if visual styles are disabled Based on TortoiseSVN rev. 23245. Signed-off-by: Sven Strickroth --- src/Utils/MiscUI/StandAloneDlg.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Utils/MiscUI/StandAloneDlg.h b/src/Utils/MiscUI/StandAloneDlg.h index cbed89163..779b4ed72 100644 --- a/src/Utils/MiscUI/StandAloneDlg.h +++ b/src/Utils/MiscUI/StandAloneDlg.h @@ -147,7 +147,9 @@ protected: { // we're dealing with radio buttons and check boxes, // which means we have to add a little space for the checkbox - const int checkWidth = GetSystemMetrics(SM_CXMENUCHECK) + 2*GetSystemMetrics(SM_CXEDGE); + // the value of 3 pixels added here is necessary in case certain visual styles have + // been disabled. Without this, the width is calculated too short. + const int checkWidth = GetSystemMetrics(SM_CXMENUCHECK) + 2*GetSystemMetrics(SM_CXEDGE) + 3; controlrectorig.right = controlrectorig.left + (controlrect.right - controlrect.left) + checkWidth; pwndDlgItem->MoveWindow(&controlrectorig); } -- 2.11.4.GIT