You've already forked lazarus-ccr
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:
@@ -575,8 +575,16 @@ procedure TCheckComboBoxEx.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPoli
|
|||||||
const AXProportion, AYProportion: Double);
|
const AXProportion, AYProportion: Double);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
if FButtonWidth < 0 then
|
if AMode in [lapAutoAdjustWithoutHorizontalScrolling, lapAutoAdjustForDPI] then
|
||||||
Buddy.Width := GetSystemMetrics(SM_CXVSCROLL);
|
begin
|
||||||
|
if FButtonWidth < 0 then
|
||||||
|
Buddy.Width := GetSystemMetrics(SM_CXVSCROLL)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
FButtonWidth := round(AXProportion * FButtonWidth);
|
||||||
|
Buddy.Width := FButtonWidth;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCheckComboBoxEx.DoChange;
|
procedure TCheckComboBoxEx.DoChange;
|
||||||
|
Reference in New Issue
Block a user