Preview behaviour

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Preview behaviour

Arnd Baecker
Hi,

there are a couple of small issues, which nag me for a while:

a) CTRL+ALT+0 should behave as a toggle between
   fit-to-window and 100% zoom
   (also for the light-table and image-editor)
b) the slider should "snap" to 100% when one is in the range
   95% < x < 105%
c) CTRL+ALT+0 should be centered
d) moving the slider, the view should stay centered

e) when going from one image to the next in preview mode,
   it should stay at the same zoom level and same position
   (This is only possible if neither image dimensions,
    nor orientation are changed.
   Otherwise it should stay at the same zoom-level,
   but center the view)

The attached patch implements a), b) c) and d).
Testing and comments are welcome.
In particular, I removed a bit of (I think unnecessary) code
at the beginning of PreviewWidget::setZoomFactor(double zoom).

About e): When going to the next image,
  void DigikamView::slotNextItem(void)
is called.
However, I don't see where (or why) the preview gets
set to fit-to-window.
Any pointers/explanations are welcome!

Best, Arnd

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel

preview_v5.patch (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Preview behaviour

Bugzilla from mikmach@wp.pl
Dnia Thursday 17 of April 2008, Arnd Baecker napisał:
> Hi,
>
> there are a couple of small issues, which nag me for a while:
>
> a) CTRL+ALT+0 should behave as a toggle between
>    fit-to-window and 100% zoom
>    (also for the light-table and image-editor)

Works, thanks.

> b) the slider should "snap" to 100% when one is in the range
>    95% < x < 105%

Works, thanks. But IMO this should go further: snapping should work also
zoom factors: fit into window; fit width; fit height. But it would
require to compute snapping factors for each image separately.

Another place where "snapping" could help are zoom buttons: when
clicking on them it should stop not only on apparently random chosen
steps but also: fit to window; fit width; fit height; 100%. It should
work in all appropriate places: preview mode, lighttable, Image Editor.

> c) CTRL+ALT+0 should be centered

Works, thanks.

> d) moving the slider, the view should stay centered

With these two I have little problem. It works as advertised of course
but let's assume I navigated (in 50% zoom) to one place in image and
used slider to zoom in this interested fragment. But zooming with slider
causes centering of image and I lost this fragment from view. My
proposition:

When starting from 'fit window' - go to center, but in other cases let keep
this same place as focus point.

One case where your patch creates problems. When browsing in preview
mode with option of full size preview turned off digiKam uses some
"virtual thumbnails". Their size (at least in my testing case) is very
similar to size of screen. It means that 'fit to window' size of preview
oscillates around 90-100% and your patch enforces 100% of zoom making
images larger than preview area. This is really uncomfortable. Problem
vanishes when using option "Albums->Embedded preview load full image
size". I hope I am clear...

It highlights two problems: 1) when reporting zoom in preview digiKam
should report zoom of real image. 2) your patch should differentiate
between slider/zoom button action and real 'fit to window'. However with
properly fixed 1), 2) shouldn't be frequent situation.

m.

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: Preview behaviour

Arnd Baecker
Hi Mikolaj,

thanks a lot for testing, some comments below:

On Thu, 17 Apr 2008, Mikolaj Machowski wrote:

> Dnia Thursday 17 of April 2008, Arnd Baecker napisał:
> > Hi,
> >
> > there are a couple of small issues, which nag me for a while:
> >
> > a) CTRL+ALT+0 should behave as a toggle between
> >    fit-to-window and 100% zoom
> >    (also for the light-table and image-editor)
>
> Works, thanks.
>
> > b) the slider should "snap" to 100% when one is in the range
> >    95% < x < 105%
>
> Works, thanks. But IMO this should go further: snapping should work also
> zoom factors: fit into window; fit width; fit height. But it would
> require to compute snapping factors for each image separately.

Ok, this wish makes sense. However, it is
not that easy to implement. So I would suggest that this
should be filed as a separate wish in the BKO.

> Another place where "snapping" could help are zoom buttons: when
> clicking on them it should stop not only on apparently random chosen
> steps but also: fit to window; fit width; fit height; 100%. It should
> work in all appropriate places: preview mode, lighttable, Image Editor.

Not sure that I understand...
Would you like to have additional buttons?

> > c) CTRL+ALT+0 should be centered
>
> Works, thanks.
>
> > d) moving the slider, the view should stay centered
>
> With these two I have little problem. It works as advertised of course
> but let's assume I navigated (in 50% zoom) to one place in image and
> used slider to zoom in this interested fragment. But zooming with slider
> causes centering of image and I lost this fragment from view. My
> proposition:
>
> When starting from 'fit window' - go to center, but in other cases let keep
> this same place as focus point.

Well, I hoped I would get away with it, but you caught me - well spotted!
I thought about implementing this as you proposed, but
it was not obvious ...
OK, I will think about how to solve this.

> One case where your patch creates problems. When browsing in preview
> mode with option of full size preview turned off digiKam uses some
> "virtual thumbnails". Their size (at least in my testing case) is very
> similar to size of screen. It means that 'fit to window' size of preview
> oscillates around 90-100% and your patch enforces 100% of zoom making
> images larger than preview area. This is really uncomfortable.

Hmm, but that's how a 100% view has to look
(because of the "virtual thumbnail" size). I don't think
my patch can be blaimed here ... ;-)

> Problem
> vanishes when using option "Albums->Embedded preview load full image
> size". I hope I am clear...

Yes, absolutely. Personally I  only use
"Albums->Embedded preview load full size".

> It highlights two problems: 1) when reporting zoom in preview digiKam
> should report zoom of real image.

Yes. This also needs a separate entry in the BKO.

> 2) your patch should differentiate
> between slider/zoom button action and real 'fit to window'.

I don't see this as the intended feature of this *small* patch
(but maybe I don't understand what you propose ...;-)
It just does
- make CTRL+ALT+0 a toggle
- snap to 100% for the slider
- make CTRL+ALT+0 centered
- moving the slider, keep the view centered
Only for the last point, there is something which has
to be improved, as you pointed out.
All the rest is just using the code-base which is already there.

Of course this does not mean the points you raise
are invalid, but fixing the reduced preview
(and the given zoom percentages) is
beyond the scope of this patch (and would
require quite substantial changes in the overall code ...).

> However with
> properly fixed 1), 2) shouldn't be frequent situation.


Thanks a lot for testing!

Best, Arnd

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: Preview behaviour

Bugzilla from mikmach@wp.pl
Dnia Thursday 17 of April 2008, Arnd Baecker napisał:

> Hi Mikolaj,
>
> thanks a lot for testing, some comments below:
>
> On Thu, 17 Apr 2008, Mikolaj Machowski wrote:
> > Dnia Thursday 17 of April 2008, Arnd Baecker napisał:
> > > Hi,
> > >
> > > there are a couple of small issues, which nag me for a while:
> > >
> > > a) CTRL+ALT+0 should behave as a toggle between
> > >    fit-to-window and 100% zoom
> > >    (also for the light-table and image-editor)
> >
> > Works, thanks.
> >
> > > b) the slider should "snap" to 100% when one is in the range
> > >    95% < x < 105%
> >
> > Works, thanks. But IMO this should go further: snapping should work
> > also zoom factors: fit into window; fit width; fit height. But it
> > would require to compute snapping factors for each image separately.
>
> Ok, this wish makes sense. However, it is
> not that easy to implement. So I would suggest that this
> should be filed as a separate wish in the BKO.

It works in gwenview and KPDF. You can look there.

> > Another place where "snapping" could help are zoom buttons: when
> > clicking on them it should stop not only on apparently random chosen
> > steps but also: fit to window; fit width; fit height; 100%. It should
> > work in all appropriate places: preview mode, lighttable, Image
> > Editor.
>
> Not sure that I understand...
> Would you like to have additional buttons?

Definitely no! Example: slider is on 90% zoom factor, if I use now
+zoom button it will jump to 108% - it should jump to 100%. Everytime
- now it works from time to time.

> > One case where your patch creates problems. When browsing in preview
> > mode with option of full size preview turned off digiKam uses some
> > "virtual thumbnails". Their size (at least in my testing case) is very
> > similar to size of screen. It means that 'fit to window' size of
> > preview oscillates around 90-100% and your patch enforces 100% of zoom
> > making images larger than preview area. This is really uncomfortable.
>
> Hmm, but that's how a 100% view has to look
> (because of the "virtual thumbnail" size). I don't think
> my patch can be blaimed here ... ;-)

;)

> > Problem
> > vanishes when using option "Albums->Embedded preview load full image
> > size". I hope I am clear...
>
> Yes, absolutely. Personally I  only use
> "Albums->Embedded preview load full size".
>
> > It highlights two problems: 1) when reporting zoom in preview digiKam
> > should report zoom of real image.
>
> Yes. This also needs a separate entry in the BKO.
>
> > 2) your patch should differentiate
> > between slider/zoom button action and real 'fit to window'.
>
> I don't see this as the intended feature of this *small* patch
> (but maybe I don't understand what you propose ...;-)
> It just does
> - make CTRL+ALT+0 a toggle
> - snap to 100% for the slider

Not only. Looks like it forces 100% zoom every time image is close to it.

m.

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: Preview behaviour

Arnd Baecker
On Thu, 17 Apr 2008, Mikolaj Machowski wrote:
> Dnia Thursday 17 of April 2008, Arnd Baecker napisał:
> > On Thu, 17 Apr 2008, Mikolaj Machowski wrote:
[...]

> > > > b) the slider should "snap" to 100% when one is in the range
> > > >    95% < x < 105%
> > >
> > > Works, thanks. But IMO this should go further: snapping should work
> > > also zoom factors: fit into window; fit width; fit height. But it
> > > would require to compute snapping factors for each image separately.
> >
> > Ok, this wish makes sense. However, it is
> > not that easy to implement. So I would suggest that this
> > should be filed as a separate wish in the BKO.
>
> It works in gwenview and KPDF. You can look there.
>
> > > Another place where "snapping" could help are zoom buttons: when
> > > clicking on them it should stop not only on apparently random chosen
> > > steps but also: fit to window; fit width; fit height; 100%. It should
> > > work in all appropriate places: preview mode, lighttable, Image
> > > Editor.
> >
> > Not sure that I understand...
> > Would you like to have additional buttons?
>
> Definitely no! Example: slider is on 90% zoom factor, if I use now
> +zoom button it will jump to 108% - it should jump to 100%. Everytime
> - now it works from time to time.

OK, I have attached a modified patch at
http://bugs.kde.org/show_bug.cgi?id=157314
(This one does not address the CTRL+SHIFT+0 centering anymore,
as these are separate issues.
I will attach that stuff once it works properly to
http://bugs.kde.org/show_bug.cgi?id=155046
)

Best, Arnd
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel