-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add zoom shortcuts ctrl + (+-0) #1012
Conversation
Fixes zealdocs#767: if needed ctrl+= is easy to add It really helps when using a touchpad ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! Please see my inline comments.
src/libs/ui/mainwindow.cpp
Outdated
@@ -218,6 +218,15 @@ MainWindow::MainWindow(Core::Application *app, QWidget *parent) : | |||
connect(ui->actionForward, &QAction::triggered, this, [this]() { currentTab()->forward(); }); | |||
addAction(ui->actionForward); | |||
|
|||
shortcut = new QShortcut(QStringLiteral("Ctrl++"), this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be:
shortcut = new QShortcut(QStringLiteral("Ctrl++"), this); | |
shortcut = new QShortcut(QKeySequence::ZoomIn, this); |
src/libs/ui/mainwindow.cpp
Outdated
connect(shortcut, &QShortcut::activated, this, [this]() { currentTab()->zoomIn(); }); | ||
shortcut = new QShortcut(QStringLiteral("Ctrl+="), this); | ||
connect(shortcut, &QShortcut::activated, this, [this]() { currentTab()->zoomIn(); }); | ||
shortcut = new QShortcut(QStringLiteral("Ctrl+-"), this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shortcut = new QShortcut(QStringLiteral("Ctrl+-"), this); | |
shortcut = new QShortcut(QKeySequence::ZoomOut, this); |
Thanks for the feedback, let me know if there's any other change needed. |
Merged, thank you! |
Fixes #767: if needed ctrl+= is easy to add
It really helps when using a touchpad ;)