Bug 428031 - Okular could use a default window size more suited to each document's dimensions and remember window sizes on a per-document basis
Summary: Okular could use a default window size more suited to each document's dimensi...
Status: RESOLVED INTENTIONAL
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.11.1
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-20 19:40 UTC by Grzegorz Szymaszek
Modified: 2020-10-22 18:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Szymaszek 2020-10-20 19:40:24 UTC
SUMMARY
When you open a document in Okular, its window has the same dimensions as the most recently resized (or maximized) Okular window. This may be inconvenient if you switch between documents of very different sizes. For example, you may want a presentation/map/photo to fill most of your screen, while a text document would be easily readable taking less than half of screen width. Another example: you may want to read some documents with the sidebar enabled (and make the window wider) and others without the sidebar (now the window is too wide).

The difference is even bigger when View→Trim View→Trim Margins is enabled, as presentations/maps/photos often have relatively small margins.

STEPS TO REPRODUCE
1. Download <http://download.ros.org/downloads/ROScheatsheet.pdf>.
2. Open the file in Okular and resize it so that those tiny letters are readable (make it 1500 px wide).
3. Download the KDE Frameworks Cookbook (PDF): <https://share.kde.org/s/jqpMS4gPs3HoxLN>.
4. Open the file in Okular.

OBSERVED RESULT
The second Okular window is too wide, the letters are too big.

EXPECTED RESULT
(a) Okular does not remember window dimensions at all. For example, it can simply fit the window size to the opened document width, with respect to document’s resolution. That’s how mupdf 1.17 and gv 3.7.4 seem to work.
(b) Okular fits the window size to the document width (like above). If the window is resized, Okular remembers the new dimensions and uses them the next time this document is opened, like it already does with zoom levels (see ~/.local/share/okular/docdata/).

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2

Reproducible under <https://files.kde.org/neon/images/testing/20201006-1820/neon-testing-20201006-1820.iso>.
Comment 1 Albert Astals Cid 2020-10-21 20:44:31 UTC
Totally disagree.

I think what you want is changing the default zoom config from Fit Width to 100%
Comment 2 Nate Graham 2020-10-21 21:09:44 UTC
I'm with Albert on this one, yeah.

I guess that means we should close it. Sorry!
Comment 3 Grzegorz Szymaszek 2020-10-22 18:43:28 UTC
I prefer to use Fit Width by default (so that it’s easy to resize the document in some sensible range), just the initial window size could be be more adaptive. Using 100% by default would fix “too big letters”, but not “too wide window” (or “too narrow”, for that matter).