anki-addons
anki-addons copied to clipboard
Zoom images
Make zoom.py
zoom the images as well.
It is rather simple to use setZoomFactor()
instead of setTextSizeMultiplier()
, but dealing with the max size is a bit more trick, especially when the user has changed it in the styling.
@ospalh
https://gist.github.com/jameskraus/d459fc504e572c3997f7
What's the issue with max size?
What's the deal with pushing one file to gist without any history, instead of pushing a commit to github? I cba to look if you did any changes to that file.
Eh, I was honestly too lazy to check out the repo and commit the changes (I only use Zoom.py).
Only change is replacing setTextSizeMultiplier() with setZoomFactor() + the associated get methods.
And what's the issue with max size?
What happens when the user has max-width
or similar in their CSS?
What should happen then?
Just a guess: If max-width is set to an absolute value, that value probably scales along with the zoom. If it's set to a relative value, the constrained dimension probably doesn't scale with the zoom. Edit: Either way, the rendering engine should take care of it.
You seem much more interested in this one add-on than i am. If you want, you may take over development. (Maybe start a new repo, or clone this one, remove all files but this and rename it.)
@ospalh I created a pull request which resolves several issues with zoom add-on for Anki 2.1. It also uses setZoomFactor
as setTextSizeMultiplier
is not available in PyQT5. If you do not have time to review and publish it please let me know and I will take care of it. Nonetheless, it should be an easy task now after the code has been written and committed.