Bug 302775

Summary: Zoom factor : unify 'mouse wheel zoom' and keyboard zoom ( Ctrl + , and Ctrl - )
Product: krita Reporter: David REVOY <info>
Component: UsabilityAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: alexeyn3d, halla
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description David REVOY 2012-06-30 00:30:29 UTC
Following the discution in this thread on the forum :
http://forum.kde.org/viewtopic.php?f=139&t=101502&sid=f1d67594337c85cb5e64349518e77499
It's appear 2 problems with 'step by step' zoom done with  'mouse wheel zoom' and keyboard zoom ( Ctrl +  , and Ctrl  - ) :


1/ The 2 method behaves differently
Zooming with mouse wheel + and - does something different , than zooming on keyboard + and - 
It would be great to have consistent behavior across the 2 method.
( note : this not affect smooth zoom like Ctrl+Space or Shift+MiddleMouse Button )

---
2/ The zoom level factor choosen by Krita are weird and not efficient, could be simplier :
For the moment the system jump to weird values like : 52, 59, 68, 77, 88%  . For artist, some key zoom level are important, for exemple : the 33.3% , who will on a 300dpi document will render on a 72ppi screen the exact size ( A4 21cmx29,7cm at 300dpi on file , so a 2480x3508pixel document , will mesure in real life displayed on screen 21cm at 33.3% of the viewport ). 66.6% become a 300dpi document zoomed by 2 , so interresting too. 
Also other mesurement are important such as 50% ( half pixel size ) who offer a good compromise for quality of resolution and fast render ( so interresting on slow brush engine as Krita to speedpaint , here all my workflow is optimised for 50% )
other are interresting too 100% real pixel size ,  big zoom for pixel-artist , etc...

All in all , a step zoom should only pass threw those values pasted under :
( note : a zoom step ' fit to the viewport' can be insered dynamically between those steps' )

* zoom in (+) *
^
|
5000% ( max )
1000%
500% 
400%
300%
200% 
150%
_____
100%
-----
66,7%
50%
33.3%
25%
20%
10%
5% ( min )
|
v
*zoom out (-) *

Also, as a ending request on this bug report, I would like to have as a duplicated key to zoom on a document simple + and -  ( to not have to spread finger to do Ctrl + and Ctrl -, witch are opposite on keyboard from numpad and so require 2 hands... Painter have already a stylus in one hand and shortcut '1 hand friendly' are nice  ) Gimp, Mypaint offer + and - to navigate per default , and for sure most user will find it faster this way.


Reproducible: Always

Actual Results:  
 

Expected Results:
Comment 1 Halla Rempt 2012-07-29 13:21:19 UTC
the latter already works, doesn't it? numpar + and -, I mean?
Comment 2 ALeXeY 2012-07-29 15:40:31 UTC
Yes, the numpad + - works well, except the minimal value is too high, 12%.

Also, I post here a "paradoxical" workaround for better use mouse wheel zoom: 
I found that when I turn OFF "Zoom with mouse wheel", the mouse wheel zoom is not only still working, but start zooming like numeric + - keys, ie, with step of 10% (or 20% after 200). IMHO, it is the some "double effect" when the toggle ON (zooming is happen two times consequentially).
*Originally was posted here: http://forum.kde.org/viewtopic.php?f=139&t=101502#p246779
Comment 3 Halla Rempt 2012-07-29 19:38:55 UTC
I've started making an inventory of zoom bugs today... This is something I really want to get rid of for ever and all before we release 2.6. Dash it, in the few moments I have time to _use_ krita, I barely dare to zoom!
Comment 4 Dmitry Kazakov 2012-11-13 13:10:36 UTC
Git commit 53e9ce5107a4a8c0fc4eb41e4205fc1c8b3426c8 by Dmitry Kazakov.
Committed on 13/11/2012 at 12:56.
Pushed by dkazakov into branch 'krita-new-move-tool-kazakov'.

Made the zooming steps consistent in Krita

1) Now the wheel and hotkey zooming in Krita is done using KoZoomAction
   instead of hardcoded code
2) The zoom levels are changed to be in consistency with other
   applications (checked in Adobe Reader and Adobe Photoshop).
   Such change was demanded in bug 302775

M  +16   -16   krita/ui/input/kis_input_manager.cpp
M  +10   -11   krita/ui/input/kis_shortcut_matcher.cpp
M  +6    -5    krita/ui/input/kis_shortcut_matcher.h
M  +54   -31   krita/ui/input/kis_zoom_action.cpp
M  +4    -0    krita/ui/input/kis_zoom_action.h
M  +6    -2    krita/ui/kis_zoom_manager.cc
M  +6    -6    libs/flake/KoCanvasControllerWidget.h
M  +102  -60   libs/widgets/KoZoomAction.cpp
M  +20   -1    libs/widgets/KoZoomAction.h

http://commits.kde.org/calligra/53e9ce5107a4a8c0fc4eb41e4205fc1c8b3426c8
Comment 5 Dmitry Kazakov 2012-11-20 16:13:47 UTC
Git commit ea7fcb4704c143031e3b556f13a65b071a0d4e52 by Dmitry Kazakov.
Committed on 20/11/2012 at 16:57.
Pushed by dkazakov into branch 'calligra/2.6'.

Made the zooming steps consistent in Krita

1) Now the wheel and hotkey zooming in Krita is done using KoZoomAction
   instead of hardcoded code
2) The zoom levels are changed to be in consistency with other
   applications (checked in Adobe Reader and Adobe Photoshop).
   Such change was demanded in bug 302775

Reviewed by Boud.

M  +16   -16   krita/ui/input/kis_input_manager.cpp
M  +10   -11   krita/ui/input/kis_shortcut_matcher.cpp
M  +6    -5    krita/ui/input/kis_shortcut_matcher.h
M  +54   -31   krita/ui/input/kis_zoom_action.cpp
M  +4    -0    krita/ui/input/kis_zoom_action.h
M  +7    -2    krita/ui/kis_zoom_manager.cc
M  +6    -6    libs/flake/KoCanvasControllerWidget.h
M  +102  -60   libs/widgets/KoZoomAction.cpp
M  +20   -1    libs/widgets/KoZoomAction.h

http://commits.kde.org/calligra/ea7fcb4704c143031e3b556f13a65b071a0d4e52