mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 14:35:56 +02:00
fixed updating restored form bounds for forms without handle
git-svn-id: trunk@6688 -
This commit is contained in:
parent
79bb663f5f
commit
1ae6bc0c26
@ -725,12 +725,14 @@ end;
|
|||||||
|
|
||||||
procedure TIDEWindowLayout.GetCurrentPosition;
|
procedure TIDEWindowLayout.GetCurrentPosition;
|
||||||
begin
|
begin
|
||||||
|
//debugln('TIDEWindowLayout.GetCurrentPosition ',DbgSName(Self),' ',FormID,' ',IDEWindowPlacementNames[WindowPlacement]);
|
||||||
case WindowPlacement of
|
case WindowPlacement of
|
||||||
iwpRestoreWindowGeometry, iwpRestoreWindowSize:
|
iwpRestoreWindowGeometry, iwpRestoreWindowSize:
|
||||||
ReadCurrentCoordinates;
|
ReadCurrentCoordinates;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
ReadCurrentState;
|
ReadCurrentState;
|
||||||
|
//debugln('TIDEWindowLayout.GetCurrentPosition ',DbgSName(Self),' ',FormID,' Width=',dbgs(Width));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TIDEWindowLayoutList }
|
{ TIDEWindowLayoutList }
|
||||||
|
@ -340,6 +340,8 @@ type
|
|||||||
fhtClose
|
fhtClose
|
||||||
);
|
);
|
||||||
|
|
||||||
|
{ TCustomForm }
|
||||||
|
|
||||||
TCustomForm = class(TScrollingWinControl)
|
TCustomForm = class(TScrollingWinControl)
|
||||||
private
|
private
|
||||||
FActive: Boolean;
|
FActive: Boolean;
|
||||||
@ -440,6 +442,7 @@ type
|
|||||||
procedure WndProc(var TheMessage : TLMessage); override;
|
procedure WndProc(var TheMessage : TLMessage); override;
|
||||||
function VisibleIsStored: boolean;
|
function VisibleIsStored: boolean;
|
||||||
function ColorIsStored: boolean; override;
|
function ColorIsStored: boolean; override;
|
||||||
|
procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); override;
|
||||||
protected
|
protected
|
||||||
// drag and dock
|
// drag and dock
|
||||||
procedure DoDock(NewDockSite: TWinControl; var ARect: TRect); override;
|
procedure DoDock(NewDockSite: TWinControl; var ARect: TRect); override;
|
||||||
|
@ -520,7 +520,7 @@ var
|
|||||||
OldState: TWindowState;
|
OldState: TWindowState;
|
||||||
begin
|
begin
|
||||||
{$IFDEF CHECK_POSITION}
|
{$IFDEF CHECK_POSITION}
|
||||||
DebugLn('[TCustomForm.WMSize] Name=',Name,' Class=',ClassName,' Message.Width=',Message.Width,' Message.Height=',Message.Height);
|
DebugLn('[TCustomForm.WMSize] ',DbgSName(Self),' Message.SizeType=',dbgs(Message.SizeType),' Message.Width=',dbgs(Message.Width),' Message.Height=',dbgs(Message.Height));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Assert(False, 'Trace:WMSIZE in TCustomForm');
|
Assert(False, 'Trace:WMSIZE in TCustomForm');
|
||||||
if not (csDesigning in ComponentState) then begin
|
if not (csDesigning in ComponentState) then begin
|
||||||
@ -553,6 +553,7 @@ begin
|
|||||||
FRestoredTop := Top;
|
FRestoredTop := Top;
|
||||||
FRestoredWidth := Width;
|
FRestoredWidth := Width;
|
||||||
FRestoredHeight := Height;
|
FRestoredHeight := Height;
|
||||||
|
//DebugLn('[TCustomForm.WMSize] saving restored bounds ',DbgSName(Self),' ',dbgs(FRestoredWidth),'x',dbgs(FRestoredHeight));
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
@ -886,6 +887,17 @@ begin
|
|||||||
Result:=(Color<>clBtnFace);
|
Result:=(Color<>clBtnFace);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomForm.DoSetBounds(ALeft, ATop, AWidth, AHeight: integer);
|
||||||
|
begin
|
||||||
|
inherited DoSetBounds(ALeft, ATop, AWidth, AHeight);
|
||||||
|
if WindowState=wsNormal then begin
|
||||||
|
FRestoredLeft:=Left;
|
||||||
|
FRestoredTop:=Top;
|
||||||
|
FRestoredWidth:=Width;
|
||||||
|
FRestoredHeight:=Height;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomForm.DoDock(NewDockSite: TWinControl; var ARect: TRect);
|
procedure TCustomForm.DoDock(NewDockSite: TWinControl; var ARect: TRect);
|
||||||
begin
|
begin
|
||||||
if (NewDockSite<>HostDockSite) then begin
|
if (NewDockSite<>HostDockSite) then begin
|
||||||
@ -1852,6 +1864,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.173 2005/01/25 20:07:03 mattias
|
||||||
|
fixed updating restored form bounds for forms without handle
|
||||||
|
|
||||||
Revision 1.172 2005/01/21 22:08:11 micha
|
Revision 1.172 2005/01/21 22:08:11 micha
|
||||||
implement restored size, let lazarus ide store restored size
|
implement restored size, let lazarus ide store restored size
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user