Skip to content
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

Merged
merged 3 commits into from
Oct 19, 2018
Merged

Conversation

knixeur
Copy link
Contributor

@knixeur knixeur commented Oct 14, 2018

Fixes #767: if needed ctrl+= is easy to add
It really helps when using a touchpad ;)

Fixes zealdocs#767: if needed ctrl+= is easy to add
It really helps when using a touchpad ;)
Copy link
Member

@trollixx trollixx left a 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.

@@ -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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be:

Suggested change
shortcut = new QShortcut(QStringLiteral("Ctrl++"), this);
shortcut = new QShortcut(QKeySequence::ZoomIn, this);

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
shortcut = new QShortcut(QStringLiteral("Ctrl+-"), this);
shortcut = new QShortcut(QKeySequence::ZoomOut, this);

src/libs/ui/mainwindow.cpp Show resolved Hide resolved
src/libs/ui/widgets/webviewtab.h Show resolved Hide resolved
@knixeur
Copy link
Contributor Author

knixeur commented Oct 17, 2018

Thanks for the feedback, let me know if there's any other change needed.

@trollixx trollixx merged commit 241b695 into zealdocs:master Oct 19, 2018
@trollixx
Copy link
Member

Merged, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants