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:
juha 2018-09-04 20:59:01 +00:00
parent 4697320fb0
commit 4366247bd3

View File

@ -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,8 +2872,8 @@ begin
Right := EditCompRect.Right;
EditCompRect.Right := Left;
end;
if not CompareRectangles(FCurrentButton.BoundsRect,EditBtnRect) then
FCurrentButton.BoundsRect:=EditBtnRect;
if FCurrentButton.BoundsRect <> EditBtnRect then
FCurrentButton.BoundsRect := EditBtnRect;
//DebugLn(['TOICustomPropertyGrid.AlignEditComponents FCurrentButton.BoundsRect=',dbgs(FCurrentButton.BoundsRect),' EditBtnRect=',dbgs(EditBtnRect)]);
end;
if FCurrentEdit<>nil then
@ -2900,8 +2896,8 @@ begin
{$ENDIF}
end;
//debugln('TOICustomPropertyGrid.AlignEditComponents A ',dbgsName(FCurrentEdit),' ',dbgs(EditCompRect));
if not CompareRectangles(FCurrentEdit.BoundsRect,EditCompRect) then
FCurrentEdit.BoundsRect:=EditCompRect;
if FCurrentEdit.BoundsRect <> EditCompRect then
FCurrentEdit.BoundsRect := EditCompRect;
end;
end;
end;