mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 10:18:05 +02:00
LCL: TToolButton: use current ButtonWidth/Height as minimum, bug #17356
git-svn-id: trunk@27938 -
This commit is contained in:
parent
64f66bd4d7
commit
964a482d5f
@ -934,7 +934,6 @@ var
|
||||
TextSize: TSize;
|
||||
TextPos: TPoint;
|
||||
IconPos: TPoint;
|
||||
DefSize: TSize;
|
||||
ImgList: TCustomImageList;
|
||||
ImgIndex: integer;
|
||||
begin
|
||||
@ -999,9 +998,8 @@ begin
|
||||
begin
|
||||
inc(PreferredWidth, 4);
|
||||
inc(PreferredHeight, 4);
|
||||
DefSize := GetControlClassDefaultSize;
|
||||
PreferredWidth := Max(PreferredWidth, DefSize.CX);
|
||||
PreferredHeight := Max(PreferredHeight, DefSize.CY);
|
||||
PreferredWidth := Max(PreferredWidth, FToolBar.ButtonWidth);
|
||||
PreferredHeight := Max(PreferredHeight, FToolBar.ButtonHeight);
|
||||
if Style = tbsDropDown then
|
||||
inc(PreferredWidth, FToolBar.FDropDownWidth);
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user