mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 13:39:11 +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;
|
procedure TOICustomPropertyGrid.AlignEditComponents;
|
||||||
var
|
var
|
||||||
RRect, EditCompRect, EditBtnRect: TRect;
|
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
|
begin
|
||||||
if ItemIndex>=0 then
|
if ItemIndex>=0 then
|
||||||
begin
|
begin
|
||||||
RRect := RowRect(ItemIndex);
|
RRect := RowRect(ItemIndex);
|
||||||
|
{.$ifdef LCLGtk2}
|
||||||
|
InflateRect(RRect, 0, 1);
|
||||||
|
{.$endif}
|
||||||
EditCompRect := RRect;
|
EditCompRect := RRect;
|
||||||
|
|
||||||
if Layout = oilHorizontal then
|
if Layout = oilHorizontal then
|
||||||
@ -2876,8 +2872,8 @@ begin
|
|||||||
Right := EditCompRect.Right;
|
Right := EditCompRect.Right;
|
||||||
EditCompRect.Right := Left;
|
EditCompRect.Right := Left;
|
||||||
end;
|
end;
|
||||||
if not CompareRectangles(FCurrentButton.BoundsRect,EditBtnRect) then
|
if FCurrentButton.BoundsRect <> EditBtnRect then
|
||||||
FCurrentButton.BoundsRect:=EditBtnRect;
|
FCurrentButton.BoundsRect := EditBtnRect;
|
||||||
//DebugLn(['TOICustomPropertyGrid.AlignEditComponents FCurrentButton.BoundsRect=',dbgs(FCurrentButton.BoundsRect),' EditBtnRect=',dbgs(EditBtnRect)]);
|
//DebugLn(['TOICustomPropertyGrid.AlignEditComponents FCurrentButton.BoundsRect=',dbgs(FCurrentButton.BoundsRect),' EditBtnRect=',dbgs(EditBtnRect)]);
|
||||||
end;
|
end;
|
||||||
if FCurrentEdit<>nil then
|
if FCurrentEdit<>nil then
|
||||||
@ -2900,8 +2896,8 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
//debugln('TOICustomPropertyGrid.AlignEditComponents A ',dbgsName(FCurrentEdit),' ',dbgs(EditCompRect));
|
//debugln('TOICustomPropertyGrid.AlignEditComponents A ',dbgsName(FCurrentEdit),' ',dbgs(EditCompRect));
|
||||||
if not CompareRectangles(FCurrentEdit.BoundsRect,EditCompRect) then
|
if FCurrentEdit.BoundsRect <> EditCompRect then
|
||||||
FCurrentEdit.BoundsRect:=EditCompRect;
|
FCurrentEdit.BoundsRect := EditCompRect;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user