mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 01:39:31 +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;
|
||||
|
||||
function TMainIDEBar.CalcNonClientHeight: Integer;
|
||||
{$IF DEFINED(LCLWin32) OR DEFINED(LCLGtk2)}
|
||||
{$IF DEFINED(LCLWin32) OR DEFINED(LCLGtk2) OR DEFINED(LCLQt)}
|
||||
var
|
||||
WindowRect, WindowClientRect: TRect;
|
||||
{$ENDIF}
|
||||
@ -545,11 +545,11 @@ begin
|
||||
if not Showing then
|
||||
Exit(0);
|
||||
|
||||
{$IF DEFINED(LCLWin32) OR DEFINED(LCLGtk2)}
|
||||
//Gtk2 + Win32
|
||||
{$IF DEFINED(LCLWin32) OR DEFINED(LCLGtk2) OR DEFINED(LCLQt)}
|
||||
//Gtk2 + Win32 + Qt
|
||||
//retrieve real main menu height because
|
||||
// - 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.GetClientRect(Handle, WindowClientRect{%H-});
|
||||
LclIntf.ClientToScreen(Handle, WindowClientRect.TopLeft);
|
||||
@ -562,7 +562,7 @@ begin
|
||||
{$ENDIF LCLWin32}
|
||||
{$ELSE}
|
||||
//other widgetsets
|
||||
//Carbon & Qt tested - they behave correctly
|
||||
//Carbon tested - behaves correctly
|
||||
Result := 0;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user