Bug 159772

Summary: [PATCH] Ctrl-mouse-wheel should allow zooming (plus some stuff)
Product: [Applications] kmplot Reporter: David Benjamin <davidben>
Component: generalAssignee: Klaus-Dieter M <kd.moeller>
Severity: wishlist CC: finex, kaabud-kde, kneczaj, samuel.brack
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: the patch

Description David Benjamin 2008-03-24 03:20:49 UTC
Version:           1.2.0 (using Devel)
Installed from:    Compiled sources
OS:                Linux

Ctrl-mousewheel is a common shortcut for zooming in many apps, e.g. Dolphin and Gwenview. It would be nice if kmplot also followed this convention.

Below is a patch to do that. In addition, the patch
1. Removes a variable that is unused due to foreach macro
2. Reworks the animation so that QTimer is used. This avoids spinning the CPU and interfering with the event loop.
(Also, MAX is set to 11 now. The old code ran for (MAX+1)*16 ms due to the for loop having a <=. To make the time the same, I set it to 11.)
3. The animation isn't run if KGlobalSettings has them disabled.

There is one slight change in the result in that the new graphs are drawn before the animation completes. Is the previous behavior preferred? (I can rework the patch to do that. It made consecutive ctrl-mousewheel zooms (i.e. perform the second zoom before the first's animation completes) kind of weird.)
Comment 1 David Benjamin 2008-03-24 03:21:27 UTC
Created attachment 24033 [details]
the patch
Comment 2 Samuel Brack 2009-11-08 17:57:16 UTC
Very good idea!
Comment 3 FiNeX 2010-08-17 22:04:53 UTC
*** Bug 193687 has been marked as a duplicate of this bug. ***
Comment 4 FiNeX 2010-08-17 22:06:20 UTC
You should submit the patch on the review board.
Follow the instruction on:


Comment 5 Christoph Feck 2012-03-07 22:36:02 UTC
*** Bug 295480 has been marked as a duplicate of this bug. ***
Comment 6 Yuri Chornoivan 2018-12-06 04:35:43 UTC
Git commit acf37fcffd9de49144a182e64ffc2d4c61916df9 by Yuri Chornoivan.
Committed on 06/12/2018 at 04:35.
Pushed by yurchor into branch 'master'.

Implement zooming with Ctrl+mouse wheel
Differential Revision: https://phabricator.kde.org/D17120

M  +8    -3    doc/index.docbook
M  +68   -51   kmplot/view.cpp
M  +25   -1    kmplot/view.h