mirror of
https://github.com/mupen64plus/mupen64plus-ui-python.git
synced 2025-04-02 10:51:53 -04:00
toggle fullscreen on double click
This commit is contained in:
parent
514e7952c9
commit
0bd8c1445d
1 changed files with 5 additions and 2 deletions
|
@ -47,6 +47,9 @@ class GLWidget(QGLWidget):
|
|||
def paintEvent(self, event):
|
||||
pass
|
||||
|
||||
def mouseDoubleClickEvent(self, event):
|
||||
self.toggle_fs()
|
||||
|
||||
def keyPressEvent(self, event):
|
||||
if self.worker.state == M64EMU_RUNNING:
|
||||
key = event.key()
|
||||
|
@ -79,8 +82,8 @@ class GLWidget(QGLWidget):
|
|||
if window.isFullScreen():
|
||||
self.parent.menubar.show()
|
||||
self.parent.statusbar.show()
|
||||
window.showNormal()
|
||||
window.setWindowState(Qt.WindowActive)
|
||||
else:
|
||||
self.parent.menubar.hide()
|
||||
self.parent.statusbar.hide()
|
||||
window.showFullScreen()
|
||||
window.setWindowState(Qt.WindowFullScreen)
|
||||
|
|
Loading…
Add table
Reference in a new issue