mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 09:36:42 +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;
|
||||
begin
|
||||
//debugln('TIDEWindowLayout.GetCurrentPosition ',DbgSName(Self),' ',FormID,' ',IDEWindowPlacementNames[WindowPlacement]);
|
||||
case WindowPlacement of
|
||||
iwpRestoreWindowGeometry, iwpRestoreWindowSize:
|
||||
ReadCurrentCoordinates;
|
||||
|
||||
end;
|
||||
ReadCurrentState;
|
||||
//debugln('TIDEWindowLayout.GetCurrentPosition ',DbgSName(Self),' ',FormID,' Width=',dbgs(Width));
|
||||
end;
|
||||
|
||||
{ TIDEWindowLayoutList }
|
||||
|
@ -340,6 +340,8 @@ type
|
||||
fhtClose
|
||||
);
|
||||
|
||||
{ TCustomForm }
|
||||
|
||||
TCustomForm = class(TScrollingWinControl)
|
||||
private
|
||||
FActive: Boolean;
|
||||
@ -440,6 +442,7 @@ type
|
||||
procedure WndProc(var TheMessage : TLMessage); override;
|
||||
function VisibleIsStored: boolean;
|
||||
function ColorIsStored: boolean; override;
|
||||
procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); override;
|
||||
protected
|
||||
// drag and dock
|
||||
procedure DoDock(NewDockSite: TWinControl; var ARect: TRect); override;
|
||||
|
@ -520,7 +520,7 @@ var
|
||||
OldState: TWindowState;
|
||||
begin
|
||||
{$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}
|
||||
Assert(False, 'Trace:WMSIZE in TCustomForm');
|
||||
if not (csDesigning in ComponentState) then begin
|
||||
@ -553,6 +553,7 @@ begin
|
||||
FRestoredTop := Top;
|
||||
FRestoredWidth := Width;
|
||||
FRestoredHeight := Height;
|
||||
//DebugLn('[TCustomForm.WMSize] saving restored bounds ',DbgSName(Self),' ',dbgs(FRestoredWidth),'x',dbgs(FRestoredHeight));
|
||||
end;
|
||||
End;
|
||||
|
||||
@ -886,6 +887,17 @@ begin
|
||||
Result:=(Color<>clBtnFace);
|
||||
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);
|
||||
begin
|
||||
if (NewDockSite<>HostDockSite) then begin
|
||||
@ -1852,6 +1864,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$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
|
||||
implement restored size, let lazarus ide store restored size
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user