mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 23:30:22 +02:00
MG: fixed form positioning when show, hide, show
git-svn-id: trunk@701 -
This commit is contained in:
parent
7ead1ebab0
commit
dca418f7d3
@ -1119,6 +1119,14 @@ begin
|
||||
if Sender is TColorDialog then
|
||||
SetColorDialogColor(Pointer(Handle),TColorDialog(Sender).Color);
|
||||
|
||||
{$IFDEF ClientRectBugFix}
|
||||
if (Sender is TCustomForm) then begin
|
||||
gtk_window_set_default_size(PgtkWindow(handle),
|
||||
TControl(Sender).Width,TControl(Sender).Height);
|
||||
gtk_widget_set_uposition(PgtkWidget(handle),
|
||||
TControl(Sender).Left, TControl(Sender).Top);
|
||||
end;
|
||||
{$ENDIF}
|
||||
gtk_widget_show(PGtkWidget(handle));
|
||||
gtk_window_set_modal(PGtkWindow(handle), true);
|
||||
end;
|
||||
@ -3203,6 +3211,14 @@ begin
|
||||
//if Sender is TForm then
|
||||
// writeln('[TgtkObject.ShowHide] START ',Sender.ClassName,' Visible=',TControl(Sender).Visible,' Window=',FormWidget^.Window<>nil);
|
||||
if TControl(Sender).Visible then begin
|
||||
{$IFDEF ClientRectBugFix}
|
||||
if (Sender is TCustomForm) then begin
|
||||
gtk_window_set_default_size(PgtkWindow(FormWidget),
|
||||
TControl(Sender).Width,TControl(Sender).Height);
|
||||
gtk_widget_set_uposition(PgtkWidget(FormWidget),
|
||||
TControl(Sender).Left, TControl(Sender).Top);
|
||||
end;
|
||||
{$ENDIF}
|
||||
gtk_widget_show(FormWidget);
|
||||
if (Sender is TCustomForm) and (FormWidget^.Window<>nil) then begin
|
||||
FormIconGdiObject:=PGDIObject(TCustomForm(Sender).GetIconHandle);
|
||||
@ -4290,6 +4306,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.123 2002/05/13 15:26:14 lazarus
|
||||
MG: fixed form positioning when show, hide, show
|
||||
|
||||
Revision 1.122 2002/05/13 14:47:01 lazarus
|
||||
MG: fixed client rectangles, TRadioGroup, RecreateWnd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user