diff --git a/Furious/Widget/GuiTUNSettings.py b/Furious/Widget/GuiTUNSettings.py index 4697698..0b1934d 100644 --- a/Furious/Widget/GuiTUNSettings.py +++ b/Furious/Widget/GuiTUNSettings.py @@ -232,7 +232,11 @@ class GuiTUNSettings(GuiEditorWidgetQDialog): super().__init__(*args, tabTranslatable=tabTranslatable, style=style, **kwargs) self.setTabText(_('Customize TUN Settings')) - self.setFixedSize(int(480 * GOLDEN_RATIO), int(480)) + + if PLATFORM == 'Darwin': + self.setFixedSize(int(550 * GOLDEN_RATIO), int(550)) + else: + self.setFixedSize(int(480 * GOLDEN_RATIO), int(480)) # Shallow copy config = Storage.UserTUNSettings() diff --git a/Furious/Window/AppMainWindow.py b/Furious/Window/AppMainWindow.py index 388fb90..a7aeb60 100644 --- a/Furious/Window/AppMainWindow.py +++ b/Furious/Window/AppMainWindow.py @@ -238,19 +238,6 @@ class AppMainWindow(AppQMainWindow): ), ] - if PLATFORM == 'Darwin': - openAppFolderAction = [] - else: - openAppFolderAction = [ - AppQAction( - _('Open Application Folder'), - icon=bootstrapIcon('folder2.svg'), - checkable=False, - callback=lambda: self.openApplicationFolder(), - ), - AppQSeperator(), - ] - if PLATFORM == 'Windows' or PLATFORM == 'Darwin': customizeTUNSettingsAction = [ AppQAction( @@ -281,6 +268,21 @@ class AppMainWindow(AppQMainWindow): else: restartAsAdminAction = [] + if PLATFORM == 'Darwin': + openAppFolderAction = [ + AppQSeperator(), + ] + else: + openAppFolderAction = [ + AppQAction( + _('Open Application Folder'), + icon=bootstrapIcon('folder2.svg'), + checkable=False, + callback=lambda: self.openApplicationFolder(), + ), + AppQSeperator(), + ] + toolsActions = [ *customizeTUNSettingsAction, *restartAsAdminAction, @@ -503,6 +505,15 @@ class AppMainWindow(AppQMainWindow): f'\'{AppCommands.RunAs.value}\' -Verb runAs', ], ) + elif PLATFORM == 'Darwin': + process.startDetached( + 'osascript', + arguments=[ + '-e', + f'do shell script \"{APP().applicationFilePath()} ' + f'{AppCommands.RunAs.value}\" with administrator privileges', + ], + ) else: mbox = AppQMessageBox(icon=AppQMessageBox.Icon.Information) mbox.setWindowTitle(_(APPLICATION_NAME))