Bug 159772 - [PATCH] Ctrl-mouse-wheel should allow zooming (plus some stuff)
Summary: [PATCH] Ctrl-mouse-wheel should allow zooming (plus some stuff)
Status: RESOLVED FIXED
Alias: None
Product: kmplot
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Klaus-Dieter M
URL:
Keywords:
: 193687 295480 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-24 03:20 UTC by David Benjamin
Modified: 2018-12-06 04:35 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
the patch (4.92 KB, patch)
2008-03-24 03:21 UTC, David Benjamin
Details

Note You need to log in before you can comment on or make changes to this bug.
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:

http://techbase.kde.org/Contribute/Send_Patches


Thanks.
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

https://commits.kde.org/kmplot/acf37fcffd9de49144a182e64ffc2d4c61916df9