Bug 407326 - Move Continuous view option from View menu to View Mode submenu, to make the main toolbar more useful.
Summary: Move Continuous view option from View menu to View Mode submenu, to make the ...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.7.0
Platform: unspecified Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-08 09:56 UTC by Laura David Hurka
Modified: 2020-03-12 21:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Mockup of View menu with Continuous mode added (26.05 KB, image/png)
2019-05-08 09:56 UTC, Laura David Hurka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laura David Hurka 2019-05-08 09:56:23 UTC
Created attachment 119910 [details]
Mockup of View menu with Continuous mode added

I suggest to move the “Continuous” view option from the View menu to the View -> View Mode submenu, so the View Mode menu can be added as a completely usable menu to the main toolbar.

Currently, the View Mode menu can be added to the main toolbar, but the Overview mode is less useful if Continuous mode can’t be activated the same, simple way.

Additionally the Change Colors option could be done the same way. See Bug 407217.

This would remove Continuous from the View menu, giving “Continuous” a bit more explaining context. But it would be a bit more difficult to discover.
Comment 1 Laura David Hurka 2019-05-08 11:13:19 UTC
(In reply to David Hurka from comment #0)
> This would remove Continuous from the View menu [...]

Thanks to KXMLGui, it seems to be possible to keep “Continuous” in the View menu, additionally to the View Mode submenu. But I think it shouldn’t appear twice.
Comment 2 Nate Graham 2019-05-13 03:49:44 UTC
I'm looking into this, and that's the rub. Adding "Continuous" into the submenu is pretty trivial:

diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index 59f9565e5..9a5028789 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -587,6 +587,8 @@ do { \
     ac->addAction(QStringLiteral("view_continuous"), d->aViewContinuous );
     connect( d->aViewContinuous, &QAction::toggled, this, &PageView::slotContinuousToggled );
     d->aViewContinuous->setChecked( Okular::Settings::viewContinuous() );
+    d->aViewMode->addSeparator();
+    d->aViewMode->addAction( d->aViewContinuous );
 
     // Mouse mode actions for viewer mode
     d->mouseModeActionGroup = new QActionGroup( this );


Making sure it doesn't appear in the submenu when the submenu is in the menubar is trickier. If you have a patch ready, feel free to submit it with [RFC] in the title, making it clear in the description that you're asking for assistance.
Comment 3 Albert Astals Cid 2020-03-12 21:03:51 UTC
Git commit 493ba07e22dacfe53ced42903371ad1ae25bcc8d by Albert Astals Cid, on behalf of David Hurka.
Committed on 12/03/2020 at 21:03.
Pushed by aacid into branch 'master'.

Move Continuous option to View Mode submenu

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.

Screenshot before:
{F6821917}

Screenshot now:
{F6821920}
and in the toolbar:
{F6821921}

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

Reviewers: #okular, #vdg, aacid

Spies: aacid, ngraham, okular-devel, kde-doc-english

Tags: #okular, #documentation

Differential Revision: https://phabricator.kde.org/D21196

M  +4    -16   doc/index.docbook
M  +1    -2    part-viewermode.rc
M  +1    -2    part.rc
M  +52   -36   ui/pageview.cpp

https://invent.kde.org/kde/okular/commit/493ba07e22dacfe53ced42903371ad1ae25bcc8d