From bde36397008e8d293b180e00a01ae2ecbfa1b4fa Mon Sep 17 00:00:00 2001 From: "Denilson M. Amorim" Date: Sat, 21 Nov 2015 13:16:20 -0300 Subject: [PATCH] Solve restore window size bug --- src/bitmessageqt/__init__.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 1819628b..996f57a9 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -700,10 +700,7 @@ class MyForm(QtGui.QMainWindow): if not self.actionShow.isChecked(): self.hide() else: - if sys.platform[0:3] == 'win': - self.setWindowFlags(Qt.Window) - # else: - # self.showMaximized() + # self.showMaximized() self.show() self.setWindowState( self.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive) @@ -1480,9 +1477,7 @@ class MyForm(QtGui.QMainWindow): if event.type() == QtCore.QEvent.WindowStateChange: if self.windowState() & QtCore.Qt.WindowMinimized: if shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform: - self.appIndicatorHide() - if 'win32' in sys.platform or 'win64' in sys.platform: - self.setWindowFlags(Qt.ToolTip) + QTimer.singleShot(0, self.appIndicatorHide) elif event.oldState() & QtCore.Qt.WindowMinimized: # The window state has just been changed to # Normal/Maximised/FullScreen -- 2.45.1