[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Nate Graham changed: What|Removed |Added Resolution|--- |FIXED Status|CONFIRMED |RESOLVED Version Fixed In||21.04 Latest Commit||https://invent.kde.org/grap ||hics/okular/-/commit/0a23d4 ||a0019aacd9ba71d38896d6b7c05 ||f25b2c9 --- Comment #18 from Nate Graham --- Fixed by Gerd Wachsmuth with https://invent.kde.org/graphics/okular/-/commit/0a23d4a0019aacd9ba71d38896d6b7c05f25b2c9 in Okular 21.04! -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Luca Weiss changed: What|Removed |Added CC||l...@z3ntu.xyz --- Comment #17 from Luca Weiss --- Still an issue in Okular v1.11.1 (KDE Applications 20.08.1) -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Martin Sandsmark changed: What|Removed |Added CC||martin.sandsm...@kde.org --- Comment #16 from Martin Sandsmark --- I think it was introduced by this commit: 2b971b07b2314479c59bc6ee3c382d8a869c9440 -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 expro...@gmail.com changed: What|Removed |Added CC||expro...@gmail.com --- Comment #15 from expro...@gmail.com --- Reproduced on Okular 1.10.0 -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Patrick Silva changed: What|Removed |Added CC||bugsefor...@gmx.com -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Albert Astals Cid changed: What|Removed |Added CC||j...@van-spaandonk.nl --- Comment #14 from Albert Astals Cid --- *** Bug 416229 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Nate Graham changed: What|Removed |Added CC||n...@kde.org -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Zakhar changed: What|Removed |Added CC|zakhar.nasi...@gmail.com| -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Albert Astals Cid changed: What|Removed |Added CC||st...@kelem.net --- Comment #13 from Albert Astals Cid --- *** Bug 412002 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Pastafarianist changed: What|Removed |Added CC||dfa...@gmail.com -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 --- Comment #12 from David Hurka --- Also reproducible with Trim to Selection, supporting the investigation of jimbo1qaz. -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 David Hurka changed: What|Removed |Added CC||zakhar.nasi...@gmail.com --- Comment #11 from David Hurka --- *** Bug 391352 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 David Hurka changed: What|Removed |Added CC||poltro...@gmail.com --- Comment #10 from David Hurka --- *** Bug 368598 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Albert Astals Cid changed: What|Removed |Added CC||alt.su-7oon2...@yopmail.com --- Comment #9 from Albert Astals Cid --- *** Bug 403178 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Magnus Aagaard Sørensen changed: What|Removed |Added CC||yildirim.us...@gmail.com --- Comment #8 from Magnus Aagaard Sørensen --- *** Bug 366449 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Magnus Aagaard Sørensen changed: What|Removed |Added Status|REPORTED|CONFIRMED CC||mag...@aagaardsorensen.dk Keywords||investigated, triaged Ever confirmed|0 |1 --- Comment #7 from Magnus Aagaard Sørensen --- Steps taken to reproduce: * Open pdf file. * Select trim to margins (View -> Trim View -> Trim Margins). * Zoom in past the "Fit Width" label. * Zooming out with GUI/mousewheel/keyboard shortcuts shifts between the "Fit Width" and the next zoom step. * Normal, expected zoom behaviour returns after deselecting trim margins. I'm not the developer, updating as part of the Okular Bug Day for the Bugsquad. Application Version: 1.5.3 KDE Plasma Version: 5.14.3 KDE Frameworks Version: 5.52.0 Qt Version: 5.11.2 -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 Christoph Feck changed: What|Removed |Added See Also||https://bugs.kde.org/show_b ||ug.cgi?id=368598 -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 --- Comment #6 from David Hurka --- Small hint if difficult to reproduce: The trimmed margins must be large enough. If this is not the case in your PDF, try to use "trim to selection" instead of "trim margins" -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 --- Comment #5 from jimbo1qaz --- I'm not a maintainer, but I've done some digging and I think this is the issue. void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight ) - defines Okular::Page *page - okularPage->width() and okularPage->height() reflect the "uncropped unzoomed" dimensions of the page (in some units, IDK). - finds the unzoomed dimensions - if cropping enabled, crops them (multiplying by Okular::NormalizedRect[0,1] coordinates) (cropped unzoomed dimensions) - multiplies by the zoom factor - calls PageViewItem::setWHZC(cropped_w, cropped_h) with cropped w,h. - PageViewItem::setWHZC sets m_croppedGeometry. - PageViewItem::setWHZC divides by crop boundaries and sets m_uncroppedGeometry --- // compute the zoom factor value for FitWidth and FitPage mode double PageView::zoomFactorFitMode( ZoomMode mode ) - const double width = okularPage->width(), height = okularPage->height(); This is the bug. width()/height() are uncropped, but FitWidth and FitPage end up zooming the cropped page region. We need to use the cropped unzoomed dimensions. But they are not exposed by the code, instead buried as local variables within PageView::updateItemSize(), and overwritten by the cropped zoomed versions when calling PageViewItem::setWHZC. Consequently, currentItem->croppedWidth()/croppedHeight() is not a proper workaround. How should this bug be fixed? --- Sidenote: Why is Okular written in Qt-flavored C++03 without std::? -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 342003] Trim margins confuses ordering of zoom steps while zooming out
https://bugs.kde.org/show_bug.cgi?id=342003 jimbo1qaz changed: What|Removed |Added CC||jimbo1...@protonmail.com Version|0.20.2 |1.3.1 --- Comment #4 from jimbo1qaz --- STEPS TO REPRODUCE 1. open pdf 2. enable "trim margins" 3. zoom in until (page-width > window-width) 4. zoom out repeatedly I've been able to reproduce bug regardless of window size. OBSERVED RESULT - When zooming in OR out, PDF snaps to "Fit Width" when the *untrimmed* margins cross 100% of screen width. - When zooming in, this sometimes causes PDF to skip a zoom level (eg. 100%). - When zooming out, this causes PDF to zoom *in* when snapping to "Fit Width". EXPECTED RESULT PDF snaps to "Fit Width" when the *trimmed* margins cross 100% of screen width. SOFTWARE VERSIONS (available in About System) KDE Plasma Version: 5.12.6 KDE Frameworks Version: 5.44.0 Qt Version: 5.9.5 Also bugged in Flatpak Okular 1.5.1. --- How do I submit a patch to fix this bug? -- You are receiving this mail because: You are watching all bug changes.