summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-06-27 13:21:50 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-06-27 13:21:50 +0000
commitd4435a509366467b3747856dc7c8671669607c9d (patch)
treed7326945cff3336c7cb5b065f1f1832f4231f1db
parenteb703bcee1956bcf075a64eaae2756eb7d48ed42 (diff)
downloadfpGUI-d4435a509366467b3747856dc7c8671669607c9d.tar.xz
* A slight fix for X11 resizing forms with the mouse and alignment processing.
-rw-r--r--src/corelib/gfx_widget.pas6
-rw-r--r--src/gui/gui_form.pas10
2 files changed, 15 insertions, 1 deletions
diff --git a/src/corelib/gfx_widget.pas b/src/corelib/gfx_widget.pas
index 03df3577..d76e88cb 100644
--- a/src/corelib/gfx_widget.pas
+++ b/src/corelib/gfx_widget.pas
@@ -890,9 +890,15 @@ begin
end;
procedure TfpgWidget.MsgResize(var msg: TfpgMessageRec);
+var
+ dw: integer;
+ dh: integer;
begin
// writeln('MsgResize - ', Classname);
+ dw := msg.Params.rect.Width - FWidth;
+ dh := msg.Params.rect.Height - FHeight;
HandleResize(msg.Params.rect.Width, msg.Params.rect.Height);
+ HandleAlignments(dw, dh);
if FFormDesigner <> nil then
begin
FFormDesigner.Dispatch(msg);
diff --git a/src/gui/gui_form.pas b/src/gui/gui_form.pas
index b75a5638..3227deef 100644
--- a/src/gui/gui_form.pas
+++ b/src/gui/gui_form.pas
@@ -321,6 +321,11 @@ begin
end;
procedure TfpgBaseForm.HandleShow;
+{$IFDEF LINUX}
+var
+ dw: integer;
+ dh: integer;
+{$ENDIF}
begin
inherited HandleShow;
if Assigned(FOnShow) then
@@ -329,7 +334,10 @@ begin
{ TODO : A temporary work-around because XLib doesn't sent a Resize event
when the form is created. It's clever enough to size the form beforehand,
but without this call the Alignment code doesn't execute. }
- inherited HandleResize(FWidth, FHeight);
+
+// dw := FPrevWidth - FWidth;
+// dh := FPrevHeight - FHeight;
+// HandleAlignments(0, 0);
{$ENDIF}
end;