Skip to content

Commit

Permalink
feat: option to double-click to fullscreen
Browse files Browse the repository at this point in the history
Resolve: #129
  • Loading branch information
BLumia committed Dec 15, 2024
1 parent b016010 commit 5a34441
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ void MainWindow::mouseDoubleClickEvent(QMouseEvent *event)
toggleMaximize();
event->accept();
break;
case Settings::DoubleClickBehavior::FullScreen:
toggleFullscreen();
event->accept();
break;
case Settings::DoubleClickBehavior::Ignore:
break;
}
Expand Down
1 change: 1 addition & 0 deletions app/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Settings : public QObject
Ignore,
Close,
Maximize,
FullScreen,
};
Q_ENUM(DoubleClickBehavior)

Expand Down
3 changes: 2 additions & 1 deletion app/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ SettingsDialog::SettingsDialog(QWidget *parent)
static QList< QPair<Settings::DoubleClickBehavior, QString> > _dc_options {
{ Settings::DoubleClickBehavior::Ignore, tr("Do nothing") },
{ Settings::DoubleClickBehavior::Close, tr("Close the window") },
{ Settings::DoubleClickBehavior::Maximize, tr("Toggle maximize") }
{ Settings::DoubleClickBehavior::Maximize, tr("Toggle maximize") },
{ Settings::DoubleClickBehavior::FullScreen, tr("Toggle fullscreen") }
};

static QList< QPair<Settings::MouseWheelBehavior, QString> > _mw_options {
Expand Down

0 comments on commit 5a34441

Please sign in to comment.