diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-03-18 15:47:32 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-03-18 15:59:36 +0200 |
commit | 505453df733d45d5cc620838c2dac033967e8d78 (patch) | |
tree | b992f2cd8f368ffd1d0391c693b620b13cfbac15 | |
parent | 432b05294a92466dae236bfda9bb601add4aea3d (diff) | |
download | fpGUI-505453df733d45d5cc620838c2dac033967e8d78.tar.xz |
UI Designer: minor tweaks.
-rw-r--r-- | uidesigner/vfddesigner.pas | 5 | ||||
-rw-r--r-- | uidesigner/vfdresizer.pas | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/uidesigner/vfddesigner.pas b/uidesigner/vfddesigner.pas index 9e170d29..b536eb37 100644 --- a/uidesigner/vfddesigner.pas +++ b/uidesigner/vfddesigner.pas @@ -161,6 +161,7 @@ begin Widget.MouseCursor := mcDefault; for n := 1 to 8 do + begin if FSelected then resizer[n] := TwgResizer.Create(self, n) else @@ -169,6 +170,7 @@ begin resizer[n].Free; resizer[n] := nil; end; + end; UpdateResizerPositions; @@ -181,6 +183,7 @@ constructor TWidgetDesigner.Create(AFormDesigner: TFormDesigner; wg: TfpgWidget; var n: integer; begin + inherited Create; FFormDesigner := AFormDesigner; FWidget := wg; FVFDClass := wgc; @@ -1486,8 +1489,8 @@ begin if wgc.WidgetClass = TOtherWidget then TOtherWidget(wg).wgClassName := newclassname; wgd := AddWidget(wg, wgc); - wg.Visible := True; wg.SetPosition(x, y, wg.Width, wg.Height); + wg.Visible := True; DeSelectAll; wgd.Selected := True; UpdatePropWin; diff --git a/uidesigner/vfdresizer.pas b/uidesigner/vfdresizer.pas index 79c0ecf4..657746b6 100644 --- a/uidesigner/vfdresizer.pas +++ b/uidesigner/vfdresizer.pas @@ -98,8 +98,8 @@ begin wgd := TWidgetDesigner(wgdesigner); gridc := maindsgn.GridResolution; - dx := dx - dx mod gridc; - dy := dy - dy mod gridc; + dx := dx - (dx mod gridc); + dy := dy - (dy mod gridc); case direction of 1: wgd.Widget.MoveAndResizeBy(dx, dy, -dx, -dy); @@ -134,7 +134,6 @@ begin 7: MouseCursor := mcSizeNESW; // bottom left 8: MouseCursor := mcSizeEW; // left end; - Visible := True; end; procedure TwgResizer.Show; |