Skip to content

Commit

Permalink
macOS Menubar fix
Browse files Browse the repository at this point in the history
This hopefully fixes the un-anchored macOS MenuBar
  • Loading branch information
hydrusnetwork committed Feb 28, 2024
1 parent 9984879 commit 7c02548
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions hydrus/client/gui/ClientGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -2268,15 +2268,24 @@ def _ImportURL(

def _InitialiseMenubar( self ):

self._menubar = QW.QMenuBar()

use_native_menubar = CG.client_controller.new_options.GetBoolean( 'use_native_menubar' )

self._menubar.setNativeMenuBar( use_native_menubar )

if not self._menubar.isNativeMenuBar():
if use_native_menubar:

self._menubar = QW.QMenuBar()

self._menubar.setNativeMenuBar( True )

if not self._menubar.isNativeMenuBar():

self._menubar.setParent( self )


else:

self._menubar = QW.QMenuBar( self )

self._menubar.setParent( self )
self._menubar.setNativeMenuBar( False )


self._menu_updater_file = self._InitialiseMenubarGetMenuUpdaterFile()
Expand Down

0 comments on commit 7c02548

Please sign in to comment.