mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 23:57:11 +02:00
customdrawn: Improves the checkbox autosizing
git-svn-id: trunk@33521 -
This commit is contained in:
parent
3223ac53ab
commit
24044afdf5
@ -204,9 +204,12 @@ begin
|
||||
cidCheckBox, cidRadioButton:
|
||||
begin
|
||||
if AStateEx.AutoSize then
|
||||
PreferredWidth := 21 + GetMeasuresEx(ADest, TCDCONTROL_CAPTION_WIDTH, AState, AStateEx);
|
||||
PreferredWidth := GetMeasures(TCDCHECKBOX_SQUARE_HEIGHT)
|
||||
+ GetMeasuresEx(ADest, TCDCONTROL_CAPTION_WIDTH, AState, AStateEx) + 6;
|
||||
|
||||
PreferredHeight := GetMeasuresEx(ADest, TCDCONTROL_CAPTION_HEIGHT, AState, AStateEx);
|
||||
PreferredHeight :=
|
||||
Max(GetMeasuresEx(ADest, TCDCONTROL_CAPTION_HEIGHT, AState, AStateEx),
|
||||
GetMeasures(TCDCHECKBOX_SQUARE_HEIGHT));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user