Qt: Double-clicking on the window toggles full screen

This commit is contained in:
Jeffrey Pfau 2015-03-29 17:12:39 -07:00
parent 3a3b7dffdb
commit cab9f3343b
3 changed files with 9 additions and 0 deletions

View File

@ -85,6 +85,7 @@ Misc:
- 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:

View File

@ -385,6 +385,13 @@ void Window::dropEvent(QDropEvent* event) {
m_controller->loadGame(url.path());
}
void Window::mouseDoubleClickEvent(QMouseEvent* event) {
if (event->button() != Qt::LeftButton) {
return;
}
toggleFullScreen();
}
void Window::enterFullScreen() {
if (isFullScreen()) {
return;

View File

@ -97,6 +97,7 @@ protected:
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*);