mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 09:20:10 +02:00
lcl: formatting
git-svn-id: trunk@30919 -
This commit is contained in:
parent
a80626134d
commit
a999b71d2c
@ -935,7 +935,8 @@ var
|
||||
ImgList: TCustomImageList;
|
||||
ImgIndex: integer;
|
||||
begin
|
||||
if (FToolBar<>nil) then begin
|
||||
if Assigned(FToolBar) then
|
||||
begin
|
||||
PreferredWidth := 0;
|
||||
PreferredHeight := 0;
|
||||
|
||||
@ -961,7 +962,7 @@ begin
|
||||
if (Style in [tbsButton, tbsDropDown, tbsCheck]) then
|
||||
begin
|
||||
GetCurrentIcon(ImgList, ImgIndex);
|
||||
if (ImgList <> nil) then
|
||||
if Assigned(ImgList) then
|
||||
begin
|
||||
IconSize := Point(ImgList.Width, ImgList.Height);
|
||||
if IconSize.y <= 0 then IconSize.X := 0;
|
||||
@ -970,19 +971,29 @@ begin
|
||||
// calculate text and icon position
|
||||
TextPos := Point(0, 0);
|
||||
IconPos := Point(0, 0);
|
||||
if TextSize.cx>0 then begin
|
||||
if IconSize.X>0 then begin
|
||||
if FToolBar.List then begin
|
||||
if TextSize.cx > 0 then
|
||||
begin
|
||||
if IconSize.X > 0 then
|
||||
begin
|
||||
if FToolBar.List then
|
||||
begin
|
||||
// icon left of text
|
||||
TextPos.X := IconPos.X + IconSize.X + 2;
|
||||
end else begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
// icon above text
|
||||
TextPos.Y := IconPos.Y + IconSize.Y + 2;
|
||||
end;
|
||||
end else begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
// only text
|
||||
end;
|
||||
end else if IconSize.x>0 then begin
|
||||
end
|
||||
else
|
||||
if IconSize.x > 0 then
|
||||
begin
|
||||
// only icon
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user