Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Commit

Permalink
Fixed zooming with Ctrl+wheel for some users.
Browse files Browse the repository at this point in the history
closes #451
  • Loading branch information
nowrep committed Jul 13, 2012
1 parent 232350c commit 69aeeac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,6 +1,7 @@
Version 1.3.1
* not yet released
* Ctrl+Enter shortcut in PIM plugin now also works with enter on numpad
* fixed zooming with Ctrl+Wheel for some users
* fixed issues with cookies filtering
* fixed $subdocument matching in AdBlock
* fixed $third-party in AdBlock rules when Referer header is empty
Expand Down
4 changes: 1 addition & 3 deletions src/lib/tools/buttonwithmenu.cpp
Expand Up @@ -108,9 +108,7 @@ void ButtonWithMenu::wheelEvent(QWheelEvent* event)
return;
}

int numDegrees = event->delta() / 8;
int numSteps = numDegrees / 15;
if (numSteps == 1) {
if (event->delta() > 0) {
if (currItemIndex != 0) {
setCurrentItem(m_items.at(currItemIndex - 1));
}
Expand Down
10 changes: 2 additions & 8 deletions src/lib/webview/webview.cpp
Expand Up @@ -952,15 +952,9 @@ void WebView::wheelEvent(QWheelEvent* event)
}

if (event->modifiers() & Qt::ControlModifier) {
int numDegrees = event->delta() / 8;
int numSteps = numDegrees / 15;
if (numSteps == 1) {
zoomIn();
}
else {
zoomOut();
}
event->delta() > 0 ? zoomIn() : zoomOut();
event->accept();

return;
}

Expand Down

0 comments on commit 69aeeac

Please sign in to comment.