Enhancing zoom feature in Gwenview

Review Request #115595 - Created Feb. 8, 2014 and submitted

Information
Abhinav Gangwar
gwenview
master
Reviewers
gwenview
gateau
The patch I designed will let Gwenview save the zoom configuration of current image, whenever the user switches to other image. Now if the other image has not been viewed before ( means no saved zoom configuration exists for this image), open it with the current zoom levels set by ZoomLock value (If ZoomLock is not enabled) or with its default size(if ZoomLock is not enabled). Otherwise display the image with its saved zoom configurations. After the Gwenview session ends, it will flush all these zoom configurations.

       The currently implemented ZoomLock feature allows to view all the images with same zoom level that has been set by user. Now, if a user switches to other image(say im2) from current image(say im1) and zoom it (to compare or some other purpose) with a different zoom level, he is gonna lost the previous image's(im1) zoom levels using which he wanted to compare the other image(im2). The user may need different zoom levels for different images to compare them. So, using the zoomlock feature, user still needs to change zoom levels again and again for images( becomes tedious for large number of images).
I tested the patch on my system and it produced expected results.

Issues

  • 10
  • 0
  • 0
  • 10
Description From Last Updated
Coding style: Gwenview code uses 4 spaces for indentation, not tabs. Being consistent with indentation makes diff more readable. Aurélien Gâteau Aurélien Gâteau
DocumentView::Setup has a `valid` field, which could be used here to avoid looking up the url in `urlToSetup` twice. The ... Aurélien Gâteau Aurélien Gâteau
coding style: space before the '<' character Aurélien Gâteau Aurélien Gâteau
ditto Aurélien Gâteau Aurélien Gâteau
No longer necessary with the suggestion I made above Aurélien Gâteau Aurélien Gâteau
This method should be marked const because it does not modify DocumentViewContainer. Aurélien Gâteau Aurélien Gâteau
I like to name maps or hashs the other way around. In this case it would be SetupForUrl. The reason ... Aurélien Gâteau Aurélien Gâteau
Coding style: Member variables should be prefixed with 'm' (for "member") Aurélien Gâteau Aurélien Gâteau
Coding style: no parenthesis around return values. Aurélien Gâteau Aurélien Gâteau
I think this can be simplified into: d->urlToSetup[view->url()] = view->setup(); Aurélien Gâteau Aurélien Gâteau
Abhinav Gangwar
Abhinav Gangwar
Abhinav Gangwar
Abhinav Gangwar
Aurélien Gâteau
Abhinav Gangwar
Commit Hook
This review has been submitted with commit 9d6f5c5e67644e9ae717500420be064ef9562070 by Aurélien Gâteau on behalf of Abhinav Gangwar to branch master.
  1. Just committed your work, thanks a lot for your contribution!
Abhinav Gangwar
Review request changed

Status: Closed (submitted)

Loading...