IDE: Try to solve wrong calculation of main window height in some systems. Calculate in Resizing handler only after IDE has started.

git-svn-id: trunk@53106 -
This commit is contained in:
juha 2016-10-13 14:06:51 +00:00
parent ce7e800da1
commit 9078e09305
2 changed files with 9 additions and 4 deletions

View File

@ -1584,9 +1584,9 @@ begin
Screen.AddHandlerActiveFormChanged(@HandleScreenChangedForm);
Screen.AddHandlerActiveControlChanged(@HandleScreenChangedControl);
IDEComponentPalette.OnClassSelected := @ComponentPaletteClassSelected;
MainIDEBar.SetupHints;
SetupIDEWindowsLayout;
RestoreIDEWindows;
MainIDEBar.SetupHints;
MainIDEBar.InitPaletteAndCoolBar;
IDEWindowCreators.AddLayoutChangedHandler(@HandleLayoutChanged);
// make sure the main IDE bar is always shown

View File

@ -418,6 +418,7 @@ procedure TMainIDEBar.DoSetMainIDEHeight(const AIDEIsMaximized: Boolean; ANewHei
begin
if not Showing then Exit;
DebugLn(['TMainIDEBar.DoSetMainIDEHeight: IDEStarted=', LazarusIDE.IDEStarted]);
if Assigned(IDEDockMaster) then
begin
if EnvironmentOptions.Desktop.AutoAdjustIDEHeight then
@ -722,9 +723,13 @@ end;
procedure TMainIDEBar.Resizing(State: TWindowState);
begin
case State of
wsMaximized, wsNormal: DoSetMainIDEHeight(State = wsMaximized);
end;
if LazarusIDE.IDEStarted then
case State of
wsMaximized, wsNormal: begin
DebugLn('TMainIDEBar.Resizing: Setting main IDE height');
DoSetMainIDEHeight(State = wsMaximized);
end;
end;
inherited Resizing(State);
end;