mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 15:39:18 +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;
|
TextSize: TSize;
|
||||||
TextPos: TPoint;
|
TextPos: TPoint;
|
||||||
IconPos: TPoint;
|
IconPos: TPoint;
|
||||||
DefSize: TSize;
|
|
||||||
ImgList: TCustomImageList;
|
ImgList: TCustomImageList;
|
||||||
ImgIndex: integer;
|
ImgIndex: integer;
|
||||||
begin
|
begin
|
||||||
@ -999,9 +998,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
inc(PreferredWidth, 4);
|
inc(PreferredWidth, 4);
|
||||||
inc(PreferredHeight, 4);
|
inc(PreferredHeight, 4);
|
||||||
DefSize := GetControlClassDefaultSize;
|
PreferredWidth := Max(PreferredWidth, FToolBar.ButtonWidth);
|
||||||
PreferredWidth := Max(PreferredWidth, DefSize.CX);
|
PreferredHeight := Max(PreferredHeight, FToolBar.ButtonHeight);
|
||||||
PreferredHeight := Max(PreferredHeight, DefSize.CY);
|
|
||||||
if Style = tbsDropDown then
|
if Style = tbsDropDown then
|
||||||
inc(PreferredWidth, FToolBar.FDropDownWidth);
|
inc(PreferredWidth, FToolBar.FDropDownWidth);
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user