Turns out you can set the initial zoom factor like this: from leo.plugins.picture_viewer import Slides Slides.scale = .5 Slides().run(c, reset_zoom = False)
So no need to change any code. You must use reset_zoom = False for this to work. The one minor negative is that the window itself doesn't get zoomed, only the image itself. On Saturday, October 23, 2021 at 11:14:24 AM UTC-4 tbp1...@gmail.com wrote: > I tried the *width* argument, and I had expected that the aspect ratio > would be the original. Instead, the width was set to my value but the > original size was not changed. So the image was clipped in width. This is > not very helpful. I'd rather see the zoom factor set so that the specified > width gets achieved. Same for the height. What should happen if they are > both specified? In that case, I expect that the entire image should be > shown, with whichever of width or height can be satisfied. > > Now that I've seen the effect of the *width* argument, I would also like > to be able to specify the initial zoom factor. > > I'm also thinking it might be useful to be able to optionally specify the > target directory. > > With all these quibbles, I really like the module. Up until now, I have > usually used IrfanView to look through a bunch of images. When I don't > need the other things it can do, picture_viewer may possibly end up being > my first choice. > > On Saturday, October 23, 2021 at 10:01:23 AM UTC-4 tbp1...@gmail.com > wrote: > >> Oh, I see, those args are for *run()*, not the constructor. >> >> On Saturday, October 23, 2021 at 9:39:14 AM UTC-4 tbp1...@gmail.com >> wrote: >> >>> Those args in the docstring are not set in the *Slides* constructor: >>> >>> exception executing script >>> TypeError: 'reset_zoom' is an unknown keyword argument >>> -------------------- >>> line 4: from leo.plugins.picture_viewer import Slides >>> * line 5: Slides(reset_zoom = False, width = 900, sort_kind = >>> None).run(c) >>> >>> The constructor only initializes *scale*, *slide_number*, and *timer*. >>> On Saturday, October 23, 2021 at 1:41:43 AM UTC-4 Edward K. Ream wrote: >>> >>>> On Fri, Oct 22, 2021 at 8:34 PM tbp1...@gmail.com <tbp1...@gmail.com> >>>> wrote: >>>> >>>>> Here's my stab at it. Replace all the current text in the docstring >>>>> ahead of the binding and API information with the following: >>>> >>>> >>>> Done at rev 2f65d83 >>>> <https://github.com/leo-editor/leo-editor/commit/2f65d83e35c7cd6ea3e8e902b8f4f7b848890833> >>>> >>>> in devel. The only change I made was to add the required 'c' arg to run. >>>> >>>> This rev also adds the 'reset_zoom' kwarg to the run method. The >>>> default is True. >>>> >>>> Many thanks, Thomas, for your testing and comments. >>>> >>>> Edward >>>> >>> -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/cc1bca2c-0676-4a1c-ae4c-e1cb385c2522n%40googlegroups.com.