ExCtrls: Fix high-dpi scaling of TCheckComboBoxEx.ButtonWidth.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8141 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-11-01 21:08:32 +00:00
parent bd0f7165d6
commit a7056cddc0

View File

@ -83,6 +83,8 @@ type
procedure ButtonClick; override;
procedure CloseUp;
procedure CreateHandle; override;
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double); override;
procedure DoEnter; override;
procedure DoChange; virtual;
procedure DoItemChange(AIndex: Integer); virtual;
@ -569,6 +571,14 @@ begin
Buddy.Width := GetSystemMetrics(SM_CXVSCROLL);
end;
procedure TCheckComboBoxEx.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double);
begin
inherited;
if FButtonWidth < 0 then
Buddy.Width := GetSystemMetrics(SM_CXVSCROLL);
end;
procedure TCheckComboBoxEx.DoChange;
begin
if Assigned(FOnChange) then FOnChange(self);