[RFC] Move Continuous option to View Mode submenu
ClosedPublic

Authored by davidhurka on May 13 2019, 5:56 PM.

Details

Summary

This moves the Continuous option from the View menu to the
View Mode submenu. This makes the View Mode menu (a KActionMenu)
more useful in the main toolbar. Additionally, “Continuous” is explained by the context “View Mode”.

The primary intention was to give this View Mode a similar usage pattern like
the Change Colors menu (D21195), if both are added to the toolbar. See my
suggestion in Bugs 407217 and 407326.

FEATURE: 407326

Screenshot before:

Screenshot now:


and in the toolbar:

Test Plan
  • Look into View menu and test entries
  • Add View Mode menu to toolbar and test entries

Diff Detail

Repository
R223 Okular
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidhurka created this revision.May 13 2019, 5:56 PM
Restricted Application added projects: Okular, Documentation. · View Herald TranscriptMay 13 2019, 5:56 PM
Restricted Application added subscribers: kde-doc-english, okular-devel. · View Herald Transcript
davidhurka requested review of this revision.May 13 2019, 5:56 PM
davidhurka edited the summary of this revision. (Show Details)May 13 2019, 6:04 PM

Nate suggested almost exactly this patch in Bug 407326. But instead of hiding Continuous when accessed from the menubar, I moved Continuous completely to the View Mode submenu.

What is part-viewermode.rc good for / how can I test that file? It’s not used in KDevelop...

Moving Continuous into the sub-menu amounts to a regression for menubar users since it becomes less noticeable in there. However I think there's an obvious solution: add the View Mode action to the default toobar, next to the Zoom combobox. Then all of this functionality becomes much much more noticeable for everyone, which is good because it's a part of the core functionality IMO.

davidhurka updated this revision to Diff 60395.Jun 22 2019, 9:52 PM
  • Replace function-like macro by lambda, like done for Color Mode menu in D21195
davidhurka updated this revision to Diff 60396.Jun 22 2019, 9:55 PM
  • Replace function-like macro by lambda, like done for Color Mode menu in D21195

View mode actions are now organized in QActionGroup * PageView::viewModeActionGroup.
(Uhm, ignore the last commit)

Would it make sense to request icons for the view modes?

  • For Single Page, something like tool_pagelayout would be nice. (It’s just a page, i. e. a rectangle with a folded corner.)
  • Facing Pages would have two pages.
  • Overview would have 2 or 3 pages, arranged like the discs in save-all. Arranging in a horizontal row would be misleading if the user configured the Overview column count.

Lazy mockup

Would it make sense to request icons for the view modes?

  • For Single Page, something like tool_pagelayout would be nice. (It’s just a page, i. e. a rectangle with a folded corner.)
  • Facing Pages would have two pages.
  • Overview would have 2 or 3 pages, arranged like the discs in save-all. Arranging in a horizontal row would be misleading if the user configured the Overview column count.

    Lazy mockup

Yes, please go ahead! File a bug to Breeze | Icons please. Those mockups aren't half bad, either. I bet with some tweaking, you could actually submit the icons yourself. See https://hig.kde.org/style/icon.html for details regarding how.

Icons are there: D22617.

Thanks very much! So now we can expect to see an Okular patch, right? :)

This is the patch. :) When can I add the icons to this patch without breaking something?

The new icons will land in KDE Frameworks 5.61. If you request icons that don't exist, nothing bad happens, they just don't get displayed. So you should be able to add your setIcon() calls anyway, and users with frameworks 5.61 will get them, and everyone else simply won't. So there's no need to bump the frameworks dependency version for Okular.

aacid requested changes to this revision.Feb 21 2020, 6:54 PM
aacid added a subscriber: aacid.

Please move as a Merge Request in https://invent.kde.org/kde/okular

We have pre-commit CI and lots of checks including clazy and clang-tidy there so it's a much better place for doing the review/approval/merge of the code.

This revision now requires changes to proceed.Feb 21 2020, 6:54 PM
This revision was not accepted when it landed; it landed in state Needs Revision.Mar 12 2020, 9:08 PM
This revision was automatically updated to reflect the committed changes.