mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:19:24 +02:00
IdeIntf: Enlarge Object inspector's ComboBox / Edit area. Improves visual appearance. Issue #33550, by Anthony Walter.
git-svn-id: trunk@58860 -
This commit is contained in:
parent
4697320fb0
commit
4366247bd3
@ -2846,17 +2846,13 @@ end;
|
||||
procedure TOICustomPropertyGrid.AlignEditComponents;
|
||||
var
|
||||
RRect, EditCompRect, EditBtnRect: TRect;
|
||||
|
||||
function CompareRectangles(r1,r2:TRect):boolean;
|
||||
begin
|
||||
Result := (r1.Left=r2.Left) and (r1.Top=r2.Top)
|
||||
and (r1.Right=r2.Right) and (r1.Bottom=r2.Bottom);
|
||||
end;
|
||||
|
||||
begin
|
||||
if ItemIndex>=0 then
|
||||
begin
|
||||
RRect := RowRect(ItemIndex);
|
||||
{.$ifdef LCLGtk2}
|
||||
InflateRect(RRect, 0, 1);
|
||||
{.$endif}
|
||||
EditCompRect := RRect;
|
||||
|
||||
if Layout = oilHorizontal then
|
||||
@ -2876,7 +2872,7 @@ begin
|
||||
Right := EditCompRect.Right;
|
||||
EditCompRect.Right := Left;
|
||||
end;
|
||||
if not CompareRectangles(FCurrentButton.BoundsRect,EditBtnRect) then
|
||||
if FCurrentButton.BoundsRect <> EditBtnRect then
|
||||
FCurrentButton.BoundsRect := EditBtnRect;
|
||||
//DebugLn(['TOICustomPropertyGrid.AlignEditComponents FCurrentButton.BoundsRect=',dbgs(FCurrentButton.BoundsRect),' EditBtnRect=',dbgs(EditBtnRect)]);
|
||||
end;
|
||||
@ -2900,7 +2896,7 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
//debugln('TOICustomPropertyGrid.AlignEditComponents A ',dbgsName(FCurrentEdit),' ',dbgs(EditCompRect));
|
||||
if not CompareRectangles(FCurrentEdit.BoundsRect,EditCompRect) then
|
||||
if FCurrentEdit.BoundsRect <> EditCompRect then
|
||||
FCurrentEdit.BoundsRect := EditCompRect;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user