Re: Class hierarchy for thumbnailctrl

Andrea Gavana <[email protected]>
Newsgroups gmane.comp.python.wxpython
Message-ID <CAEf70bzj4v=T+Pn3GtqUyp-67VuBjpvocCSygCyJnKsJqgaWyA@mail.gmail.com>
Hi,

On Tue, 8 Sep 2020 at 20:08, Michael Eager <[email protected]> wrote:

> On 9/8/20 10:49 AM, Andrea Gavana wrote:
> > Hi,
> >
> > On Tue, 8 Sep 2020 at 18.45, Michael Eager <[email protected]
> > <mailto:[email protected]>> wrote:
> >
>
> >     There are some problems with the control.  Setting the Zoom factor
> >     doesn't do anything; the _zoomfactor value is never used. Zooming
> with
> >     the + or - key doesn't appear to have any affect.
> >
> > It should, or at least it did in wxPython Classic. See the methods
> > ZoomIn and ZoomOut - they don’t rely directly on the _zoomfactor
> > attribute, they rather call GetZoomFactor. Have you tried setting the
> > focus on the ThumbnailCtrl via mouse click and then use the mouse wheel
> > (with the Ctrl Key pressed) using the + or - keys.
>
> Setting focus and using the mouse wheel does work.  Hitting + or - does
> not.  The SetZoomFactor method does not appear to work.
>

The SetZoomFactor does nothing by itself, because it's simply a scaling
factor used when you call ZoomIn and ZoomOut. You should try and set it to
a small value first (like 1.1) and play with the mouse wheel, then set it
to a much bigger factor (like 4) and try again. See if there is a
difference.

I am pretty sure that the "+" or "-" used to work, it may be that the
OnChar method is not called anymore? I don't know.



>
> >     I have the impression that thumbnailctrl.py is an app trying to
> >     masquerade as a control.  It does more than just display thumbnails
> >     in a
> >     window:  it reads a directory, sorts the files by name, displays a
> >     combobox with the path, deletes files, maybe more.  This makes it
> much
> >     less flexible as a control, for example, if I want to display
> >     thumbnails
> >     in a different order, or supply images to be displayed, rather a
> >     directory.  Some of these features, like displaying a combobox with
> the
> >     path, could easily be done in an app which used a simpler thumbnail
> >     display control.
> >
> > I’ve already heard this remark/critique about ThumbnailCtrl, and I
> > believe it’s a valid point. That said, I am not that much involved in
> > the development of wxPython anymore, so until someone steps up and
> > modify the control to make it more generic/less app-style I guess it
> > will stay as it is.
>
> I might be interest in trying to do this.  Removing functionality would
> make it no longer backward compatible.  What would be the right way to
> do this?  Create a NewThumbnailCtrl.py with the reduced/simplified
> functionality?
>

To be honest I don't know. If it's just removing the combobox and other
whistles and bells I don't think many people will complain, but
substantially changing the behaviour will get somebody upset. That said,
adding new handlers to cater for thumbnails for other extension types
doesn't need that much of a breakage in my view.

In any case, Robin is the ultimate czar of wxPython so he will have to
express his opinion on the best way forward.

Andrea.



>
> --
> Michael Eager
>

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/CAEf70bzj4v%3DT%2BPn3GtqUyp-67VuBjpvocCSygCyJnKsJqgaWyA%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.