Hello.
I have identical question/request that @acc4 regarding smooth zooming with mouse wheel:
I don’t paint very often, and use Krita predominantly for editing textures and maps for Blender. I use mouse for it as I’m switching between Krita and Blender. For this kind of usage having the ability to zoom in-and-out smoothly would be very nice.
I know that I can do it with Ctrl+Push-Scroll but it is pretty inconvenient. I guess that this can be done with providing the users the ability to change hardcoded shortcuts.
Almost all keyboard shortcuts can be changed. In the menu bar click on Settings ⟩ Configure Krita. If I remember correctly the settings window should have a shortcuts button in the side bar. On the shortcuts page, you probably find it under canvas inputs.
In the Canvas Input Settings, Zoom Canvas group, I’ve tried mapping the Mouse Wheel Up/Down in various ways to the Relative Zoom mode and I can’t get it to work, even if I delete obvious clashes with other canvas input settings.
Mouse Wheel Up/Down is fine for Zoom In/Out and that may be because those two are discrete actions which also can have keyboard shortcuts.
Do you think something like blender has smooth scrolling (since you mention it)? If so maybe its easy enough to look at that as a reference since its also gpl code like krita. Otherwise I’m not really sure how easy smooth scrolling is. It could just be something like current zoom * 1.1 but if its not would probably take a lot of experimenting to find something good.
Just inserting more steps of zoom levels would do wonder imo.
Btw I checked another painting software(firealpaca) that is built on qt, regarding this issue and it behaved the same as krita. The zoom level is fixed with the same value steps. I’m starting to wonder if this is because krita is based on qt and uses its functionality. (Although I have no idea how this works on the code level)
Either way, I second this request. And if dev is reading plz note that it’s not about aesthetic smoothness in terms of zooming motions, it’s that we need more steps in zoom levels.
Also… to those “you can just do this as a workaround why bother” folks who might spawn : if you need to use the feature very frequently/on a constant basis while your drawing, such as changing zoom levels, even 1 more click becomes very bothersome. Because it basically means you have to do it a thousand times in the actual working process.
Blender behaves very similarly to Krita, however the main difference is that there is more steps between zoom levels and it feels more gradual and fluid.
I assume that implementing true smooth zoom can be difficult without existing tools, so inserting more steps sounds like a good improvement - from user perspective.
So I took a look at the code and its pretty easy to just add more steps for the zoom. I added half steps between the current ones and this is what it looks like:
You can watch the zoom numbers in the top left popup and compare to yours. After playing with it for a bit it definitely feels less jarring per zoom step. Something like this could at least be added as separate zoom in option/shortcut. If you are on Linux I made an appimage if you want to try it out.
Also there is this KA post + @Rakurri’s comment about adding a slider to set the scaling of your zoom which sounds very nice. Especially since different tablets/wheels would probably need different scaling it would be nice for it be customizable. Although I’m not sure where exactly this setting would live. Maybe under “canvas input settings” but that seems just for setting canvas shortcuts. If there is a good spot for it I would prefer to add something like this.
Progress update! I went with adding the slider to set customizeable zoom steps. I put it in the settings under general-> tools as “Zoom Step Size”. There are 6 levels with 6 having the biggest steps and 1 having the smallest. The original Krita zoom is set as the default at level 5 and the one you tested earlier I set to level 3.
I made another appimage here if you want to give it a try. Let me know how it works if you test it out. Note for the setting to take affect you’ll have to reopen your document.
Still to do:
Try to figure out a way to refresh the setting without reopening the document
Check everywhere that uses zoom and check it updates correctly
Oh man. Scaling at 2 feels sooo good with flying scroll wheel in my mouse. This is great!
I think everyone will need to find their ideal setting here as most hardware have some differences.
Good luck with TODOs, and thanks again for your work.
OK I think I have most of the work done. I’m making (hopefully) one last build which you can find here. It is mostly the same except It should also update your zoom correctly as soon as you save/exit from the settings menu. If you can try it out and make sure there are no bugs that would be really help .
This was added to Krita in this MR. This added an “Enable smooth zooming” toggle to Krita instead of the slider. You can try out by downloading the latest krita Next which should also have builds for mac/windows. Let me know how it works
I tried both builds. Dev build is working fine, after opening the smooth zoom settings were imported and set to where I leaved them in previous Dev build.
Enabling Smooth Zooming works, but having additional scaling option was even better. Right now there is no way to tune zooming to specific device, which can be hit or miss.
Yeah having a slider was more customizable. To get something similar back I need to figure out how to tweak how the levels are generated to include the base zoom levels (like 25%,50%,66%, etc) that people would expect while also increasing the granularity. I’m still thinking about how to do that but I’ll figure it out eventually.