Window resize on minimize bugfix

Fixes Bitmessage#243
This commit is contained in:
mailchuck 2015-11-22 01:07:25 +01:00
parent 24d8ffcd54
commit 84b47877b1
Signed by untrusted user who does not match committer: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -798,10 +798,6 @@ class MyForm(settingsmixin.SMainWindow):
if not self.actionShow.isChecked(): if not self.actionShow.isChecked():
self.hide() self.hide()
else: else:
if sys.platform[0:3] == 'win':
self.setWindowFlags(Qt.Window)
# else:
# self.showMaximized()
self.show() self.show()
self.setWindowState( self.setWindowState(
self.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive) self.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
@ -1637,9 +1633,7 @@ class MyForm(settingsmixin.SMainWindow):
if event.type() == QtCore.QEvent.WindowStateChange: if event.type() == QtCore.QEvent.WindowStateChange:
if self.windowState() & QtCore.Qt.WindowMinimized: if self.windowState() & QtCore.Qt.WindowMinimized:
if shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform: if shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform:
self.appIndicatorHide() QTimer.singleShot(0, self.appIndicatorHide)
if 'win32' in sys.platform or 'win64' in sys.platform:
self.setWindowFlags(Qt.ToolTip)
elif event.oldState() & QtCore.Qt.WindowMinimized: elif event.oldState() & QtCore.Qt.WindowMinimized:
# The window state has just been changed to # The window state has just been changed to
# Normal/Maximised/FullScreen # Normal/Maximised/FullScreen