ExCtrls: Fix high-dpi scaling of TCheckComboBoxEx.ButtonWidth (2nd part)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8142 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-11-01 21:16:53 +00:00
parent a7056cddc0
commit 50ceae732d

View File

@ -575,8 +575,16 @@ procedure TCheckComboBoxEx.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPoli
const AXProportion, AYProportion: Double);
begin
inherited;
if FButtonWidth < 0 then
Buddy.Width := GetSystemMetrics(SM_CXVSCROLL);
if AMode in [lapAutoAdjustWithoutHorizontalScrolling, lapAutoAdjustForDPI] then
begin
if FButtonWidth < 0 then
Buddy.Width := GetSystemMetrics(SM_CXVSCROLL)
else
begin
FButtonWidth := round(AXProportion * FButtonWidth);
Buddy.Width := FButtonWidth;
end;
end;
end;
procedure TCheckComboBoxEx.DoChange;