GUI: set modal work-around to Big Sur+

This commit is contained in:
Mykola Grymalyuk
2022-05-22 11:31:20 -06:00
parent 69f7ad7115
commit e7143f2242
2 changed files with 5 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import wx
import webbrowser
from resources import constants
from data import os_data
class gui_help_menu:
def __init__(self, versions, frame, frame_modal):
@@ -18,7 +19,8 @@ class gui_help_menu:
else:
self.frame_modal.DestroyChildren()
self.frame_modal.Close()
self.frame_modal.ShowWithoutActivating()
if self.constants.detected_os >= os_data.os_data.big_sur:
self.frame_modal.ShowWithoutActivating()
def help_menu(self, event=None):
# Define Menu

View File

@@ -117,7 +117,8 @@ class wx_python_gui:
# If the previous frame was a modal, the new frame will anchor onto it
# instead of the core frame
# Calling ShowWithoutActivating() resets the frame position
self.frame_modal.ShowWithoutActivating()
if self.constants.detected_os >= os_data.os_data.big_sur:
self.frame_modal.ShowWithoutActivating()
def use_non_metal_alternative(self):
if self.constants.detected_os >= os_data.os_data.monterey: