This forum has been archived. All content is frozen. Please use KDE Discuss instead.
Please use bugs.kde.org for bug reports or feature requests. Development related questions should be directed to the okular-devel mailing list.

"fit best" zoom

Should this "fit best" zoom level be included in Okular?

Poll ended at Thu Jul 18, 2013 8:16 pm

Yes, as it is
74%
Yes, but with changes as I wrote in the comments
23%
Not now, major changes should be made first
No votes
No, never
3%

Total votes : 35


Tags: None
(comma "," separated)
Elv13
Registered Member
Posts
23
Karma
0
OS

Re: "fit best" zoom

Sun Jul 07, 2013 7:17 pm
I think Okular should use Gwenview/Umbrello zoom widget

Image
http://imageshack.us/a/img5/2065/blender154.png

It already has a statusbar for the page selection. Why not adding the zoom slider and 100%/Fit width/Fit best buttons there?


Elv13, proud KDE user since KDE 2.2.
thomasfischer
Registered Member
Posts
11
Karma
0

Re: "fit best" zoom

Sun Jul 07, 2013 10:32 pm
isilmendil wrote:In the reviewboard you mentioned some edge-cases. Could you illustrate the worst-case behaviour of your algorithm?

The "fit height" or "fit width" cases may zoom very deeply into the document which may consume system resources and render the document's content in gigantic letters.
User avatar
TSDgeos
Moderator
Posts
49
Karma
0

Re: "fit best" zoom

Sun Jul 07, 2013 10:33 pm
thomasfischer wrote:
isilmendil wrote:In the reviewboard you mentioned some edge-cases. Could you illustrate the worst-case behaviour of your algorithm?

The "fit height" or "fit width" cases may zoom very deeply into the document which may consume system resources and render the document's content in gigantic letters.


Why would fit width zoom very deeply?
thomasfischer
Registered Member
Posts
11
Karma
0

Re: "fit best" zoom

Sun Jul 07, 2013 10:34 pm
JaKi wrote:It sure is a nice idea which some people will love I guess. But I don't like automatic view adjustments. I don't care about them as long as the whole thing is optional and I can turn it off.

The auto/best fit feature is just one more option in the drop-down list where you already find "Fit Width" and "Fit Page". If you don't need it, just ignore it ;)
thomasfischer
Registered Member
Posts
11
Karma
0

Re: "fit best" zoom

Sun Jul 07, 2013 10:36 pm
Henry Miller wrote:Can you detect coumns within a document and accont for this in best fit? I'm not sure when or how, but when PDFs are layed out in columns there are probably cases where you can fit more of the column on the page with a different zoom.

That would be a nice feature, indeed. The current code only inspects the page size without looking into its content. It is not restricted to PDF, but should work with other document types supported by Okular (not tested though).
thomasfischer
Registered Member
Posts
11
Karma
0

Re: "fit best" zoom

Sun Jul 07, 2013 10:38 pm
mutlu wrote:I like this, but I would also like the "fit height" option to have it all together. There have been many instances where the latter would have been of great use and I am not sure whether the former would have been appropriate in each and every case.

As there is already a "Fit Width", "Fit Page", and hopefully soon an "Auto Fit", coding a "Fit Height" makes a perfect Junior Job. Volunteers? ;)
thomasfischer
Registered Member
Posts
11
Karma
0

Re: "fit best" zoom

Sun Jul 07, 2013 10:42 pm
Elv13 wrote:I think Okular should use Gwenview/Umbrello zoom widget
It already has a statusbar for the page selection. Why not adding the zoom slider and 100%/Fit width/Fit best buttons there?

This is an idea worth thinking about. As it is outside of the scope of the best/auto fit patch, please write a bug report for this or, even better, submit a patch on your own?
User avatar
TSDgeos
Moderator
Posts
49
Karma
0

Re: "fit best" zoom

Sun Jul 07, 2013 10:54 pm
thomasfischer wrote:
mutlu wrote:I like this, but I would also like the "fit height" option to have it all together. There have been many instances where the latter would have been of great use and I am not sure whether the former would have been appropriate in each and every case.

As there is already a "Fit Width", "Fit Page", and hopefully soon an "Auto Fit", coding a "Fit Height" makes a perfect Junior Job. Volunteers? ;)


What's the use case for "Fit Height"?
thomasfischer
Registered Member
Posts
11
Karma
0

Re: "fit best" zoom

Sun Jul 07, 2013 11:07 pm
Based on the comments so far, I updated the patch in two aspects:
First, the feature has been renamed to "Auto Fit", which is supported by most of the comments.
Second, I tried to add it to one of the default zoom options in the settings dialog. Although "Auto Fit" turns up in the settings dialog, choosing it does not activate it when restarting Okular. I don't know (yet) what's wrong, so suggestions are welcome (please reply directly in Reviewboard).
thomasfischer
Registered Member
Posts
11
Karma
0

Re: "fit best" zoom  Topic is solved

Sun Aug 18, 2013 3:32 pm
My patch, after some more minor revisions, got accepted into Okular :)

Code: Select all
https://bugs.kde.org/show_bug.cgi?id=249364

Albert Astals Cid <aacid@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |http://commits.kde.org/okul
                   |                            |ar/e4aa8317b5d49ad1129e23bd
                   |                            |a52415ff7dc0a290

--- Comment #11 from Albert Astals Cid <aacid@kde.org> ---
Git commit e4aa8317b5d49ad1129e23bda52415ff7dc0a290 by Albert Astals Cid, on
behalf of Thomas Fischer.
Committed on 18/08/2013 at 15:19.
Pushed by aacid into branch 'master'.

Auto-fit zoom
REVIEW: 110003

M  +5    -0    conf/dlggeneralbase.ui
M  +1    -1    conf/okular.kcfg
M  +12   -0    doc/index.docbook
M  +2    -1    part.rc
M  +72   -8    ui/pageview.cpp
M  +2    -1    ui/pageview.h

http://commits.kde.org/okular/e4aa8317b ... ff7dc0a290


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], Sogou [Bot]