mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 10:29:29 +02:00
IDE: Fix main window height calculation with QT on Linux. Issue #28063.
git-svn-id: trunk@48980 -
This commit is contained in:
parent
7a2e9badfb
commit
022a311650
@ -522,7 +522,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDEBar.CalcNonClientHeight: Integer;
|
function TMainIDEBar.CalcNonClientHeight: Integer;
|
||||||
{$IF DEFINED(LCLWin32) OR DEFINED(LCLGtk2)}
|
{$IF DEFINED(LCLWin32) OR DEFINED(LCLGtk2) OR DEFINED(LCLQt)}
|
||||||
var
|
var
|
||||||
WindowRect, WindowClientRect: TRect;
|
WindowRect, WindowClientRect: TRect;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -545,11 +545,11 @@ begin
|
|||||||
if not Showing then
|
if not Showing then
|
||||||
Exit(0);
|
Exit(0);
|
||||||
|
|
||||||
{$IF DEFINED(LCLWin32) OR DEFINED(LCLGtk2)}
|
{$IF DEFINED(LCLWin32) OR DEFINED(LCLGtk2) OR DEFINED(LCLQt)}
|
||||||
//Gtk2 + Win32
|
//Gtk2 + Win32 + Qt
|
||||||
//retrieve real main menu height because
|
//retrieve real main menu height because
|
||||||
// - Win32: multi-line is possible (SM_CYMENU reflects only single line)
|
// - Win32: multi-line is possible (SM_CYMENU reflects only single line)
|
||||||
// - Gtk2: SM_CYMENU does not work
|
// - Gtk2, Qt: SM_CYMENU does not work
|
||||||
LclIntf.GetWindowRect(Handle, WindowRect{%H-});
|
LclIntf.GetWindowRect(Handle, WindowRect{%H-});
|
||||||
LclIntf.GetClientRect(Handle, WindowClientRect{%H-});
|
LclIntf.GetClientRect(Handle, WindowClientRect{%H-});
|
||||||
LclIntf.ClientToScreen(Handle, WindowClientRect.TopLeft);
|
LclIntf.ClientToScreen(Handle, WindowClientRect.TopLeft);
|
||||||
@ -562,7 +562,7 @@ begin
|
|||||||
{$ENDIF LCLWin32}
|
{$ENDIF LCLWin32}
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
//other widgetsets
|
//other widgetsets
|
||||||
//Carbon & Qt tested - they behave correctly
|
//Carbon tested - behaves correctly
|
||||||
Result := 0;
|
Result := 0;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user