anki-addons icon indicating copy to clipboard operation
anki-addons copied to clipboard

Zoom images

Open ospalh opened this issue 9 years ago • 8 comments

Make zoom.py zoom the images as well.

ospalh avatar Mar 12 '15 15:03 ospalh

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 avatar Sep 21 '15 11:09 ospalh

@ospalh

https://gist.github.com/jameskraus/d459fc504e572c3997f7

What's the issue with max size?

jameskraus avatar Feb 21 '16 01:02 jameskraus

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.

ospalh avatar Feb 21 '16 08:02 ospalh

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?

jameskraus avatar Feb 22 '16 18:02 jameskraus

What happens when the user has max-width or similar in their CSS? What should happen then?

ospalh avatar Feb 22 '16 22:02 ospalh

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.

jameskraus avatar Feb 23 '16 03:02 jameskraus

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 avatar Feb 23 '16 08:02 ospalh

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

krassowski avatar Sep 23 '17 21:09 krassowski