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.AddHandlerActiveFormChanged(@HandleScreenChangedForm);
Screen.AddHandlerActiveControlChanged(@HandleScreenChangedControl); Screen.AddHandlerActiveControlChanged(@HandleScreenChangedControl);
IDEComponentPalette.OnClassSelected := @ComponentPaletteClassSelected; IDEComponentPalette.OnClassSelected := @ComponentPaletteClassSelected;
MainIDEBar.SetupHints;
SetupIDEWindowsLayout; SetupIDEWindowsLayout;
RestoreIDEWindows; RestoreIDEWindows;
MainIDEBar.SetupHints;
MainIDEBar.InitPaletteAndCoolBar; MainIDEBar.InitPaletteAndCoolBar;
IDEWindowCreators.AddLayoutChangedHandler(@HandleLayoutChanged); IDEWindowCreators.AddLayoutChangedHandler(@HandleLayoutChanged);
// make sure the main IDE bar is always shown // make sure the main IDE bar is always shown

View File

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