You've already forked lazarus-ccr
exctrls/exquestiondlg: Parameterize some distances and make them high-dpi aware.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8156 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user