Skip to content

Commit

Permalink
trying to resolve full screen exit issues on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
dschanoeh authored and gedakc committed May 3, 2019
1 parent 5ab745b commit 385396c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion manuskript/ui/editors/fullScreenEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
class fullScreenEditor(QWidget):
def __init__(self, index, parent=None):
QWidget.__init__(self, parent)
self.setAttribute(Qt.WA_DeleteOnClose, True)
self._background = None
self._index = index
self._theme = findThemePath(settings.fullScreenTheme)
Expand Down Expand Up @@ -80,7 +81,7 @@ def __init__(self, index, parent=None):
# Close
self.btnClose = QPushButton(self)
self.btnClose.setIcon(qApp.style().standardIcon(QStyle.SP_DialogCloseButton))
self.btnClose.clicked.connect(self.close)
self.btnClose.clicked.connect(self.leaveFullscreen)
self.btnClose.setFlat(True)

# Top panel Layout
Expand Down Expand Up @@ -174,6 +175,10 @@ def __del__(self):
self.showNormal()
self.close()

def leaveFullscreen(self):
self.showNormal()
self.close()

def setLocked(self, val):
self._locked = val
self.btnClose.setVisible(not val)
Expand Down

0 comments on commit 385396c

Please sign in to comment.