mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 12:48:18 +10:00
GUI: Add extra padding for pre-Big Sur UI
This commit is contained in:
@@ -71,6 +71,12 @@ class InstallOCFrame(wx.Frame):
|
||||
"""
|
||||
self.available_disks = install.tui_disk_installation(self.constants).list_disks()
|
||||
|
||||
# Need to clean up output on pre-Sierra
|
||||
# Disk images are mixed in with regular disks (ex. payloads.dmg)
|
||||
for disk in self.available_disks.copy():
|
||||
if "read-only" in self.available_disks[disk]['name']:
|
||||
del self.available_disks[disk]
|
||||
|
||||
|
||||
def _display_disks(self) -> None:
|
||||
"""
|
||||
@@ -143,12 +149,12 @@ class InstallOCFrame(wx.Frame):
|
||||
disk_label.Center(wx.HORIZONTAL)
|
||||
|
||||
# Add button: Search for disks again
|
||||
search_button = wx.Button(dialog, label="Search for disks again", size=(150,30), pos=(-1, disk_label.GetPosition()[1] + disk_label.GetSize()[1] + 5))
|
||||
search_button = wx.Button(dialog, label="Search for disks again", size=(160,30), pos=(-1, disk_label.GetPosition()[1] + disk_label.GetSize()[1] + 5))
|
||||
search_button.Center(wx.HORIZONTAL)
|
||||
search_button.Bind(wx.EVT_BUTTON, self.on_reload_frame)
|
||||
|
||||
# Add button: Return to main menu
|
||||
return_button = wx.Button(dialog, label="Return to main menu", size=(150,30), pos=(-1, search_button.GetPosition()[1] + 20))
|
||||
return_button = wx.Button(dialog, label="Return to main menu", size=(160,30), pos=(-1, search_button.GetPosition()[1] + 20))
|
||||
return_button.Center(wx.HORIZONTAL)
|
||||
return_button.Bind(wx.EVT_BUTTON, self.on_return_to_main_menu)
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ class macOSInstallerFrame(wx.Frame):
|
||||
installer_button.SetDefault()
|
||||
|
||||
# Show all available installers
|
||||
show_all_button = wx.Button(dialog, label="Show all available installers" if show_full is False else "Show only latest installers", pos=(-1, installer_button.GetPosition()[1] + installer_button.GetSize()[1]), size=(180, 30))
|
||||
show_all_button = wx.Button(dialog, label="Show all available installers" if show_full is False else "Show only latest installers", pos=(-1, installer_button.GetPosition()[1] + installer_button.GetSize()[1]), size=(200, 30))
|
||||
show_all_button.Bind(wx.EVT_BUTTON, lambda event: self._display_available_installers(event, not show_full))
|
||||
show_all_button.Center(wx.HORIZONTAL)
|
||||
|
||||
|
||||
@@ -141,6 +141,13 @@ class macOSInstallerFlashFrame(wx.Frame):
|
||||
def fetch_disks():
|
||||
self.available_disks = macos_installer_handler.InstallerCreation().list_disk_to_format()
|
||||
|
||||
# Need to clean up output on pre-Sierra
|
||||
# Disk images are mixed in with regular disks (ex. payloads.dmg)
|
||||
for disk in self.available_disks.copy():
|
||||
if "read-only" in self.available_disks[disk]['name']:
|
||||
del self.available_disks[disk]
|
||||
|
||||
|
||||
thread = threading.Thread(target=fetch_disks)
|
||||
thread.start()
|
||||
|
||||
@@ -177,12 +184,12 @@ class macOSInstallerFlashFrame(wx.Frame):
|
||||
disk_button.Center(wx.HORIZONTAL)
|
||||
|
||||
# Search for disks again
|
||||
search_button = wx.Button(self.frame_modal, label="Search for disks again", pos=(-1, disk_button.GetPosition()[1] + disk_button.GetSize()[1]), size=(150, 30))
|
||||
search_button = wx.Button(self.frame_modal, label="Search for disks again", pos=(-1, disk_button.GetPosition()[1] + disk_button.GetSize()[1]), size=(160, 30))
|
||||
search_button.Bind(wx.EVT_BUTTON, self.on_select)
|
||||
search_button.Center(wx.HORIZONTAL)
|
||||
|
||||
# Button: Return to Main Menu
|
||||
cancel_button = wx.Button(self.frame_modal, label="Return to Main Menu", pos=(-1, search_button.GetPosition()[1] + search_button.GetSize()[1] - 10), size=(150, 30))
|
||||
cancel_button = wx.Button(self.frame_modal, label="Return to Main Menu", pos=(-1, search_button.GetPosition()[1] + search_button.GetSize()[1] - 10), size=(160, 30))
|
||||
cancel_button.Bind(wx.EVT_BUTTON, self.on_return_to_main_menu)
|
||||
cancel_button.Center(wx.HORIZONTAL)
|
||||
|
||||
|
||||
@@ -84,12 +84,12 @@ class CheckProperties:
|
||||
"""
|
||||
Check if host supports building OpenCore configs
|
||||
"""
|
||||
if self.constants.custom_model:
|
||||
return True
|
||||
if self.constants.host_is_hackintosh is True:
|
||||
return False
|
||||
if self.constants.allow_oc_everywhere is True:
|
||||
return True
|
||||
if self.constants.custom_model:
|
||||
return True
|
||||
if self.constants.computer.real_model in model_array.SupportedSMBIOS:
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user