mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-22 02:50:15 +10:00
GUI: Implement Pulse() work-around for non-Metal
ASB I beg of you, please fix this. This hack is so painful…
This commit is contained in:
@@ -8,6 +8,7 @@ from resources.wx_gui import (
|
||||
gui_settings,
|
||||
)
|
||||
from resources import constants
|
||||
from data import model_array, os_data
|
||||
|
||||
class MainMenu(wx.Frame):
|
||||
def __init__(self, parent: wx.Frame, title: str, global_constants: constants.Constants, screen_location: tuple = None):
|
||||
@@ -16,6 +17,9 @@ class MainMenu(wx.Frame):
|
||||
self.constants: constants.Constants = global_constants
|
||||
self.title: str = title
|
||||
|
||||
self.model_label: wx.StaticText = None
|
||||
self.build_button: wx.Button = None
|
||||
|
||||
self._generate_elements()
|
||||
|
||||
self.SetPosition(screen_location) if screen_location else self.Centre()
|
||||
@@ -64,6 +68,14 @@ class MainMenu(wx.Frame):
|
||||
button.Center(wx.HORIZONTAL)
|
||||
button_y += 30
|
||||
|
||||
if button_name == "Build and Install OpenCore":
|
||||
self.build_button = button
|
||||
if gui_support.CheckProperties(self.constants).host_can_build() is False:
|
||||
button.Disable()
|
||||
elif button_name == "Post-Install Root Patch":
|
||||
if self.constants.detected_os < os_data.os_data.big_sur:
|
||||
button.Disable()
|
||||
|
||||
# Text: Copyright
|
||||
copy_label = wx.StaticText(self, label=self.constants.copyright_date, pos=(-1, button_y + 10))
|
||||
copy_label.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, ".AppleSystemUIFont"))
|
||||
|
||||
Reference in New Issue
Block a user