Qt: Double-clicking on the window toggles full screen
Jeffrey Pfau jeffrey@endrift.com
Sun, 29 Mar 2015 17:12:39 -0700
3 files changed,
9 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -85,6 +85,7 @@ - GBA Thread: Make GBASyncWaitFrameStart time out
- GBA: Move A/V stream interface into core - GBA: Savestates now take into account savedata state machines (fixes #109) - Qt: Remember window position + - Qt: Double-clicking on the window toggles full screen 0.1.1: (2015-01-24) Bugfixes:
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -385,6 +385,13 @@ event->accept();
m_controller->loadGame(url.path()); } +void Window::mouseDoubleClickEvent(QMouseEvent* event) { + if (event->button() != Qt::LeftButton) { + return; + } + toggleFullScreen(); +} + void Window::enterFullScreen() { if (isFullScreen()) { return;
M
src/platform/qt/Window.h
→
src/platform/qt/Window.h
@@ -97,6 +97,7 @@ virtual void closeEvent(QCloseEvent*) override;
virtual void focusOutEvent(QFocusEvent*) override; virtual void dragEnterEvent(QDragEnterEvent*) override; virtual void dropEvent(QDropEvent*) override; + virtual void mouseDoubleClickEvent(QMouseEvent*) override; private slots: void gameStarted(GBAThread*);