mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 02:37:37 +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);
|
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
|
if not (csDesigning in LCLObject.ComponentState) then
|
||||||
MenuBar.FIsApplicationMainMenu := True
|
MenuBar.FIsApplicationMainMenu := True
|
||||||
@ -7096,14 +7096,9 @@ begin
|
|||||||
QWidget_setMouseTracking(Result, True);
|
QWidget_setMouseTracking(Result, True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Main menu bar
|
|
||||||
{$IFDEF DARWIN}
|
|
||||||
MenuBar := TQtMenuBar.Create(nil);
|
|
||||||
{$ELSE}
|
|
||||||
MenuBar := TQtMenuBar.Create(Result);
|
MenuBar := TQtMenuBar.Create(Result);
|
||||||
if (csDesigning in LCLObject.ComponentState) then
|
if (csDesigning in LCLObject.ComponentState) then
|
||||||
MenuBar.setProperty(MenuBar.Widget,'lcldesignmenubar',1);
|
MenuBar.setProperty(MenuBar.Widget,'lcldesignmenubar',1);
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
{$IFDEF QTSCROLLABLEFORMS}
|
{$IFDEF QTSCROLLABLEFORMS}
|
||||||
if QWidget_windowType(Result) = QtSplashScreen then
|
if QWidget_windowType(Result) = QtSplashScreen then
|
||||||
|
|||||||
@ -7037,7 +7037,7 @@ begin
|
|||||||
|
|
||||||
Result := QMainWindow_create(nil, QtWindow);
|
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
|
if not (csDesigning in LCLObject.ComponentState) then
|
||||||
MenuBar.FIsApplicationMainMenu := True
|
MenuBar.FIsApplicationMainMenu := True
|
||||||
@ -7115,13 +7115,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// Main menu bar
|
// Main menu bar
|
||||||
{$IFDEF DARWIN}
|
|
||||||
MenuBar := TQtMenuBar.Create(nil);
|
|
||||||
{$ELSE}
|
|
||||||
MenuBar := TQtMenuBar.Create(Result);
|
MenuBar := TQtMenuBar.Create(Result);
|
||||||
if (csDesigning in LCLObject.ComponentState) then
|
if (csDesigning in LCLObject.ComponentState) then
|
||||||
MenuBar.setProperty(MenuBar.Widget,'lcldesignmenubar',1);
|
MenuBar.setProperty(MenuBar.Widget,'lcldesignmenubar',1);
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
{$IFDEF QTSCROLLABLEFORMS}
|
{$IFDEF QTSCROLLABLEFORMS}
|
||||||
if QWidget_windowType(Result) = QtSplashScreen then
|
if QWidget_windowType(Result) = QtSplashScreen then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user