diff --git a/components/exctrls/source/exquestiondlg.pas b/components/exctrls/source/exquestiondlg.pas index 2c49fe72c..1494e1234 100644 --- a/components/exctrls/source/exquestiondlg.pas +++ b/components/exctrls/source/exquestiondlg.pas @@ -67,10 +67,13 @@ uses TypInfo, Math; const + DEFAULT_IMAGE_SIZE = 32; DEFAULT_IMAGE_BORDER_X = 10; DEFAULT_IMAGE_BORDER_Y = 5; DEFAULT_TEXT_BORDER_X = 10; DEFAULT_TEXT_BORDER_Y = 10; + BUTTON_MIN_WIDTH = 75; + BUTTON_SPACING = 6; function GetBKType(str:string):TBitBtnKind; var @@ -192,12 +195,12 @@ begin btn.OnClick := @HelpClickHandler; if trim(btnParams[i].Caption) <> '' then btn.Caption := btnParams[i].Caption; - btn.Constraints.MinWidth := 75; + btn.Constraints.MinWidth := Scale96ToFont(BUTTON_MIN_WIDTH); btn.Cancel := (btnParams[i].IsDefaultOrCancel = 2); btn.Default := (btnParams[i].IsDefaultOrCancel = 1); if btn.Default then ActiveControl := btn; btn.AutoSize := true; - btn.BorderSpacing.Around := 6; + btn.BorderSpacing.Around := Scale96ToFont(BUTTON_SPACING); if i = 0 then btn.AnchorSideLeft.Control := FInnerButtonPanel else @@ -358,7 +361,7 @@ begin if Assigned(FImage) then imgHeight := FImage.Height else - imgHeight := 32; + imgHeight := Scale96ToFont(DEFAULT_IMAGE_SIZE); if (AHeight < 2*FImageBorder.CY + imgHeight) then AHeight := 2*FImageBorder.CY + imgHeight; if AHeight < QuestionDlgEx_MinHeight then