Please use bugs.kde.org for bug reports or feature requests. Development related questions should be directed to the okular-devel mailing list.
Reply to topic

"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


thomasfischer
Registered Member
Posts
8
Karma
0

"fit best" zoom

Thu Jul 04, 2013 8:16 pm
Hello,

I have been working on a new zoom setting for Okular: "fit best" zoom. This zoom level complements the existing "fit width" and "fit page". The patch that demonstrates my zoom setting is document in the Git Review Board issue 110003.

The idea of "fit best" is to transparently switch between "fit width", "fit page", and a hypothetical "fit height", based on the size relation between the shown page and Okular's window size. The three images below show each of the three cases:

  • If the page size and Okular's area to show pages have approximately the same aspect ratio, the page is scaled to fit this area (like "fit page"). Use case would be when you are looking on landscape-oriented PDF slides in a maximized Okular window (4:3 aspect ratio).
    Image
  • If the page is much wider than Okular's document area, it is assumed that the document would become unreadable if scaled to fit. To make use of the document area and allow the user to read the document as good as possible, the document is scaled to fit the area's height (like "fit height"). Would be useful if you have a split-screen window layout on your desktop, where Okular's window is very tall compared to the documents you are viewing.
    Image
  • If the page is much taller than Okular's document area, the same reasoning like for the second case is applied, but this time vertically instead of horizontally (like "fit width"). Think of viewing a portrait-oriented A4 document such as a letter. If your eye sight and your screen are good, you can still read it, but don't assume everyone else can. So a better choice may be to fit-width zoom the page, even if only a small section is visible, but at least the text should be readable.
    Image

Notice, that in all cases the chosen zoom level is "Fit Best", i.e. when the screenshots were made, only Okular's window size was changed to trigger the changes. The hard-coded threshold for the changes are if the ratio between the document area's aspect ratio and the page's aspect ratio passes 1.25 and 1/1.25, respectively (see the patch for details).

Now, Albert Astals Cid, maintainer of Okular, asked me to put this feature to discussion in the forum before it may be included in Okular. His concerns are (1) whether such a zoom level is useful or necessary, (2) the name "fit best" describes it correctly or if another name should be chosen, and (3) how it compares to Evince's "best fit" zoom. The third concern is easily answered: Evince's "best fit" zoom is essentially the same as Okular's "fit page". The first two concerns I would like to open for discussion here, to ease aacid's mind and to allow a git commit. ;)
User avatar bcooksley
Administrator
Posts
18657
Karma
83
OS

Re: "fit best" zoom

Thu Jul 04, 2013 11:15 pm
From what I can see here, this looks like quite useful behaviour - I have had to change the zoom level manually from time to time when viewing documents in the past for various reasons, and they would probably show up properly more often with this behaviour.


System Settings and Device Actions KCM maintainer
Image
User avatar Gallaecio
Registered Member
Posts
82
Karma
0
OS

Re: "fit best" zoom

Fri Jul 05, 2013 5:03 am
What about "Auto Fit"?
User avatar labatts
Registered Member
Posts
39
Karma
0
OS

Re: "fit best" zoom

Sat Jul 06, 2013 7:22 pm
I agree with Gallaecio. " Auto Fit" might be a better choice to avoid potential user confusion with those who are used to evince (even though your usage makes more sense). All in all, I think it is wonderful.
User avatar karthikp
Registered Member
Posts
106
Karma
0
OS

Re: "fit best" zoom

Sat Jul 06, 2013 7:56 pm
I don't see "auto" conveying any more information than "best". If space weren't an issue, "fit to largest dimension" would be a good choice. Perhaps some icons could be used to express this better in a pull-down menu...


karthikp, proud to be a member of KDE forums since 2008.
Image
onety-three
Registered Member
Posts
37
Karma
0
OS

Re: "fit best" zoom

Sat Jul 06, 2013 8:57 pm
I'd consider "Auto fit" a better choice, too. In my eyes it conveys more clearly that there is a heuristic at work instead of something that somehow objectively is "the best" regardless of the user's specific intent. Just fits the feature better and thus causes less confusion, I think.
isilmendil
Registered Member
Posts
1
Karma
0

Re: "fit best" zoom

Sat Jul 06, 2013 9:10 pm
(1) whether such a zoom level is useful or necessary,

From your description, it seems like a very useful feature. I'd definitely like to see it in okular.

(2) the name "fit best" describes it correctly or if another name should be chosen

I second the "auto fit" suggestion. If it was that clear what's "best", evince would probably do it the same way. "Automatic" is neutral and fits the description.

In the reviewboard you mentioned some edge-cases. Could you illustrate the worst-case behaviour of your algorithm?
User avatar JaKi
Registered Member
Posts
101
Karma
0
OS

Re: "fit best" zoom

Sun Jul 07, 2013 1:19 am
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 view modes Okular has are fine for me, I seldom use fit to whatsoever with PDFs, I use a certain zoom level so I can read the text without my nose nearly touching the display.
Henry Miller
Registered Member
Posts
1
Karma
0

Re: "fit best" zoom

Sun Jul 07, 2013 2:03 am
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.
happy_heyoka
Registered Member
Posts
7
Karma
0
OS

Re: "fit best" zoom

Sun Jul 07, 2013 6:08 am
I like "Fit Best", but another suggestion would be (for English) "Fit Nearest" or "Fit Closest"; just because it's consistent with current "Fit Page" and "Fit Width"

The menu icon should be a 16:9 'screen' rectangle over a page that's slightly bigger...
Perhaps the "Fit Page" and "Fit Width" icon could be revisited to show the 'screen' rectangle; yeah I know the little boxes in the current icons are supposed to suggest that.

I'm all for "Fit Height" to round it off ;)

It would be interesting know how complicated a hypothetical "Fit Content" would be.
(Perhaps Henry is thinking along the same lines)
Perhaps a brute force method would be to render the page to a small pixmap (or blur), threshold and try and discover the background colour and the edge of the content - something like that could work for a book with page numbers way outside of the content and big page borders... ignore outlier page number and crop the borders...
Yeah, I know, won't work for everything and I can see holes in it already (like equal size but oppositely oriented page gutters would mean wrong rectangle for every other page)
mutlu
Registered Member
Posts
73
Karma
0
OS

Re: "fit best" zoom

Sun Jul 07, 2013 10:47 am
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.
User avatar annew
Manager
Posts
1155
Karma
11
OS

Re: "fit best" zoom

Sun Jul 07, 2013 11:00 am
JaKi wrote:as long as the whole thing is optional and I can turn it off.


It looks as though the sidepanel has a scrollable view, in which case I think this would be quite useful to many people. However I too would like the option to turn it off, or, even better, to turn it off for the current viewing.

I would also welcome any discussion about how best to handle columnar text. I find reading such report very annoying. I can't imagine, though, how this can be improved unless it's possible to identify white space and scroll down only the section to the left (useless for LtoR languages, even if it worked). Someone must have a better solution.


annew, proud to be a member of KDE forums since 2008-Oct and a KDE user since 2002.
Join us on http://userbase.kde.org
pedromc
Registered Member
Posts
8
Karma
0
OS

Re: "fit best" zoom

Sun Jul 07, 2013 1:46 pm
I like the idea and agree to its inclusion.

Regarding the name, I also prefer "auto fit". "best" is subjective and does not really make clear what it does. I suggest a pool for the name.
Evropi
Registered Member
Posts
3
Karma
0
OS

Re: "fit best" zoom

Sun Jul 07, 2013 5:25 pm
I think the ideal solution is to make this the default as said above, but...

It would be nice if it were a button similar to the one on the shutdown/restart/hibernate/etc window, where the most important one (in this case, fit best) is obviously there very clearly and the dropdown arrow on it is more implicit.

Basically, 99% of users will go for this option so you might as well make it the 'default' so to speak, and leave the others just beneath it but not as the preferred option. I wish I could make a mockup, but unfortunately I'm a terrible artist. :(
hein
KDE Developer
Posts
15
Karma
1
OS

Re: "fit best" zoom

Sun Jul 07, 2013 5:54 pm
Resounding "Yes!" from my side - this is my favorite zoom mode in image viewers, and implementing it in Gwenview has been on my todo list for a long time. My plan was to call it "Fill Viewport" there, but I'm also OK with "Fit Best" since it avoids the techy jargon.

Edit: Here's the Gwenview ticket: https://bugs.kde.org/show_bug.cgi?id=195579


Konversation, Yakuake, Homerun and Plasma Task Manager maintainer.

 
Reply to topic

Bookmarks



Who is online

Registered users: alake, Alexa [Bot], Baidu [Spider], Bing [Bot], bobo01, einar, Exabot [Bot], Google [Bot], Hei Ku, joshaughnessy, Marand, mgraesslin, nezumi, orbmiser, TheraHedwig, Yahoo [Bot]