Fix macOS bug

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2023-09-30 20:43:28 +08:00
parent be157aecd3
commit e705cdfdd7
2 changed files with 13 additions and 5 deletions
+11 -5
View File
@@ -2322,8 +2322,12 @@ class ServerWidget(Translatable, SupportConnectedCallback, TableWidget):
return
if APP().tray.ConnectAction.isConnecting():
# Show the MessageBox asynchronously
self.progressWaitBox.open()
if PLATFORM != 'Darwin':
# Show the MessageBox asynchronously
self.progressWaitBox.open()
else:
# Show the MessageBox and wait for user to close it
self.progressWaitBox.exec()
return
@@ -2454,9 +2458,6 @@ class EditConfigurationWidget(MainWindow):
# Note: Set tab text later
self.editorTab.addTab(self.serverEditorTabWidget, '')
if APP().HideEditor == Switch.ON_:
self.editorTab.hide()
self.serverWidget = ServerWidget(parent=self)
# Buttons
@@ -2499,6 +2500,11 @@ class EditConfigurationWidget(MainWindow):
self.splitter.setStretchFactor(0, 8)
self.splitter.setStretchFactor(1, 5)
if APP().HideEditor == Switch.ON_:
APP().processEvents()
self.editorTab.hide()
self.fakeCentralWidget = QWidget()
self.fakeCentralWidgetLayout = QHBoxLayout(self.fakeCentralWidget)
+2
View File
@@ -175,6 +175,8 @@ class MainWindow(Translatable, SupportConnectedCallback, NeedSyncSettings, QMain
super().show()
if PLATFORM == 'Darwin':
APP().processEvents()
self.setWidthAndHeight()
moveToCenter(self)