From b178c4deff9bb8447408c5b469e658bc813075ae Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 28 Sep 2010 11:52:45 +0200 Subject: uidesigner: Fixed Object Inspector editor bounds to fit cell * When you selected a property, the property editor did not take into account the owner component's border widths, so they overlapped by 2 pixels. --- uidesigner/newformdesigner.pas | 6 +++--- uidesigner/uidesigner.lpi | 8 +++----- uidesigner/vfdprops.pas | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/uidesigner/newformdesigner.pas b/uidesigner/newformdesigner.pas index b974d262..c20548e5 100644 --- a/uidesigner/newformdesigner.pas +++ b/uidesigner/newformdesigner.pas @@ -798,7 +798,7 @@ end; function TwgPropertyList.RowHeight: integer; begin - Result := 22; + Result := 23; end; procedure TwgPropertyList.OnUpdateProperty(Sender: TObject); @@ -969,8 +969,8 @@ begin editor := prop.CreateEditor(Self); x := 3 + NameWidth; - y := FMargin + (FFocusItem - FFirstItem) * RowHeight; - editor.SetPosition(x, y - 1, Width - ScrollBarWidth - x, RowHeight); + y := FMargin + ((FFocusItem - FFirstItem) * RowHeight); + editor.SetPosition(x, y, Width - FMargin - ScrollBarWidth - x, RowHeight-1); // last -1 is so cell border lines are still visible editor.CreateLayout; editor.OnUpdate := @OnUpdateProperty; editor.LoadValue(Props.Widget); diff --git a/uidesigner/uidesigner.lpi b/uidesigner/uidesigner.lpi index 597c7e3c..63d091e8 100644 --- a/uidesigner/uidesigner.lpi +++ b/uidesigner/uidesigner.lpi @@ -1,7 +1,7 @@ - + @@ -9,10 +9,9 @@ - - + @@ -112,7 +111,7 @@ - + @@ -120,7 +119,6 @@ - diff --git a/uidesigner/vfdprops.pas b/uidesigner/vfdprops.pas index 687254ea..8eb3c896 100644 --- a/uidesigner/vfdprops.pas +++ b/uidesigner/vfdprops.pas @@ -331,7 +331,7 @@ begin Edit.Anchors := Anchors; // Edit.OnChange := @UpdateProperty; Edit.OnKeyPress := @EditKeyPressed; - Edit.OnExit :=@EditExit; + Edit.OnExit := @EditExit; Edit.Visible := True; end; -- cgit v1.2.3-70-g09d2