@@ -636,27 +636,28 @@ def refresh_styles(self):
636636 _ = \
637637 imgui .style .colors [imgui .COLOR_TEXT_DISABLED ] = \
638638 globals .settings .style_text_dim
639- self .qt_app .setStyleSheet (f"""
640- QMenu {{
641- padding: 5px;
642- background-color: { colors .rgba_0_1_to_hex (globals .settings .style_bg )[:- 2 ]} ;
643- }}
644- QMenu::item {{
645- margin: 1px;
646- padding: 2px 7px 2px 7px;
647- border-radius: { globals .settings .style_corner_radius } ;
648- color: { colors .rgba_0_1_to_hex (globals .settings .style_text )[:- 2 ]} ;
649- }}
650- QMenu::item:disabled {{
651- color: { colors .rgba_0_1_to_hex (globals .settings .style_text_dim )[:- 2 ]} ;
652- }}
653- QMenu::item:selected:enabled {{
654- background-color: { colors .rgba_0_1_to_hex (globals .settings .style_accent )[:- 2 ]} ;
655- }}
656- QMenu::icon {{
657- padding-left: 7px;
658- }}
659- """ )
639+ if globals .os is not Os .MacOS :
640+ self .qt_app .setStyleSheet (f"""
641+ QMenu {{
642+ padding: 5px;
643+ background-color: { colors .rgba_0_1_to_hex (globals .settings .style_bg )[:- 2 ]} ;
644+ }}
645+ QMenu::item {{
646+ margin: 1px;
647+ padding: 2px 7px 2px 7px;
648+ border-radius: { globals .settings .style_corner_radius } ;
649+ color: { colors .rgba_0_1_to_hex (globals .settings .style_text )[:- 2 ]} ;
650+ }}
651+ QMenu::item:disabled {{
652+ color: { colors .rgba_0_1_to_hex (globals .settings .style_text_dim )[:- 2 ]} ;
653+ }}
654+ QMenu::item:selected:enabled {{
655+ background-color: { colors .rgba_0_1_to_hex (globals .settings .style_accent )[:- 2 ]} ;
656+ }}
657+ QMenu::icon {{
658+ padding-left: 7px;
659+ }}
660+ """ )
660661
661662 def refresh_fonts (self ):
662663 imgui .io .fonts .clear ()
@@ -5361,7 +5362,8 @@ def update_pause(*_):
53615362 self .menu .addAction (self .toggle_pause )
53625363 self .menu .addAction (self .toggle_gui )
53635364 self .menu .addAction (self .quit )
5364- self .setContextMenu (self .menu )
5365+ if globals .os is not Os .MacOS :
5366+ self .setContextMenu (self .menu )
53655367 self .menu_open = False
53665368 self .menu .aboutToShow .connect (self .showing_menu )
53675369 self .menu .aboutToHide .connect (self .hiding_menu )
@@ -5431,5 +5433,7 @@ def update_status(self, *_):
54315433 self .update_icon ()
54325434
54335435 def activated_filter (self , reason : QtWidgets .QSystemTrayIcon .ActivationReason ):
5434- if reason in self .show_gui_events :
5436+ if globals .os is Os .MacOS and reason == QtWidgets .QSystemTrayIcon .ActivationReason .Context :
5437+ self .menu .popup (QtGui .QCursor .pos ())
5438+ elif reason in self .show_gui_events :
54355439 self .main_gui .show ()
0 commit comments