mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-03 20:02:48 +01:00
Qt5,Qt6: fixed menu bar behaviour under mac
This commit is contained in:
parent
6f6b86931c
commit
021a83beaf
@ -7019,7 +7019,7 @@ begin
|
||||
|
||||
Result := QMainWindow_create(nil, QtWindow);
|
||||
|
||||
MenuBar := TQtMenuBar.Create(Result);
|
||||
MenuBar := TQtMenuBar.Create({$IFNDEF DARWIN}nil{$ELSE}Result{$ENDIF});
|
||||
|
||||
if not (csDesigning in LCLObject.ComponentState) then
|
||||
MenuBar.FIsApplicationMainMenu := True
|
||||
@ -7096,14 +7096,9 @@ begin
|
||||
QWidget_setMouseTracking(Result, True);
|
||||
end;
|
||||
|
||||
// Main menu bar
|
||||
{$IFDEF DARWIN}
|
||||
MenuBar := TQtMenuBar.Create(nil);
|
||||
{$ELSE}
|
||||
MenuBar := TQtMenuBar.Create(Result);
|
||||
if (csDesigning in LCLObject.ComponentState) then
|
||||
MenuBar.setProperty(MenuBar.Widget,'lcldesignmenubar',1);
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF QTSCROLLABLEFORMS}
|
||||
if QWidget_windowType(Result) = QtSplashScreen then
|
||||
|
||||
@ -7037,7 +7037,7 @@ begin
|
||||
|
||||
Result := QMainWindow_create(nil, QtWindow);
|
||||
|
||||
MenuBar := TQtMenuBar.Create(Result);
|
||||
MenuBar := TQtMenuBar.Create({$IFNDEF DARWIN}nil{$ELSE}Result{$ENDIF});
|
||||
|
||||
if not (csDesigning in LCLObject.ComponentState) then
|
||||
MenuBar.FIsApplicationMainMenu := True
|
||||
@ -7115,13 +7115,9 @@ begin
|
||||
end;
|
||||
|
||||
// Main menu bar
|
||||
{$IFDEF DARWIN}
|
||||
MenuBar := TQtMenuBar.Create(nil);
|
||||
{$ELSE}
|
||||
MenuBar := TQtMenuBar.Create(Result);
|
||||
if (csDesigning in LCLObject.ComponentState) then
|
||||
MenuBar.setProperty(MenuBar.Widget,'lcldesignmenubar',1);
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF QTSCROLLABLEFORMS}
|
||||
if QWidget_windowType(Result) = QtSplashScreen then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user