Solve restore window size bug
This commit is contained in:
parent
72ea076099
commit
bde3639700
|
@ -700,10 +700,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
if not self.actionShow.isChecked():
|
if not self.actionShow.isChecked():
|
||||||
self.hide()
|
self.hide()
|
||||||
else:
|
else:
|
||||||
if sys.platform[0:3] == 'win':
|
# self.showMaximized()
|
||||||
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)
|
||||||
|
@ -1480,9 +1477,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
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
|
||||||
|
|
Reference in New Issue
Block a user