Bug 157289 - Make the review bar a standard toolbar
Summary: Make the review bar a standard toolbar
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-06 21:14 UTC by kde2eran
Modified: 2020-06-04 13:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.11.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kde2eran 2008-02-06 21:14:10 UTC
Version:           svn r771286 (using Devel)
Installed from:    Compiled sources

The review bar currently intrudes into the content area and hides some of the content. Even it happens to overlay whitespace, it's visually jarring to have large colorful icons looming over dense rows of text.

Can the review bar be changed into a standard toolbar, and docked next to the main toolbar? There's plenty of space there, and it's a logical place to put it. The standard toolbars are more flexible and less obtrusive, and people who like the current layout will still be able to approximate it simply by undocking the review toolbar and moving it onto the content area.

That said: Pino, kudos for the review functionality! It's extremely useful for my work and has been #1 on my KDE wishlist for many years.
Comment 1 Pino Toscano 2008-02-06 21:16:27 UTC
> Can the review bar be changed into a standard toolbar, and docked next to the main toolbar?

No.
(And yes, I feel grumpy today.)
Comment 2 Pino Toscano 2008-02-06 21:49:26 UTC
Grumpyness aside, there are some reasons why I think the review toolbar (so, *this particular case*) should stay as is:
a) making it a standard toolbar would mean taking place for a whole row/column of icons, and I don't want to crowd the main toolbar area (take in mind that when translated, the toolbar text will take 150% the "English" width)
b) it must be visible only in normal mode, or if not it would take precious room
c) switching it means sort of "flickering" and "jumping" of the main content area
d) (kinda consequence of a) ) it's less intrusive of a standard toolbar
Comment 3 kde2eran 2008-02-06 22:07:40 UTC
About (b) and (c), if the review toolbar is horizontal and to the right of the main toolbar in the same row, then there's no jumping, right?

Anyway, how about making it a standard toolbar that defaults to undocked? I've seen this in many applications so it seems more standard than the border-protrusion approach. And it seems to solve all the problems you point out, while still allowing people to configure things according to their preferences, window size and translation. Isn't this what standard movable toolbars were made for?
Comment 4 Pino Toscano 2008-02-06 22:18:16 UTC
> if the review toolbar is horizontal and to the right of the main toolbar in the same row, then there's no jumping, right?

There is. The point is that the content area chages its size, and that can be "surprising" or unwanted.

> Anyway, how about making it a standard toolbar that defaults to undocked?

The default state does not change the fact that all the points I said above remain valid as long as you decide to dock it again (like many people will do).
Comment 5 kde2eran 2008-02-06 22:35:23 UTC
Sorry, I still don't follow. If the review bar is docked horizontally in the same row as the main toolbar, and the window is wide enough to accommodate both, then when does the content area *below* that row change its size?
Comment 6 Tristan Miller 2008-10-14 12:13:05 UTC
Please let the user decide what is and is not "precious space" -- many of us have very large displays, so the loss of a few dozen pixels to a toolbar is not going to significantly detract from the screen real estate used to show the document.  Allow the toolbar to be docked when dragged to one of the four window edges.  Make it appear undocked by default if you want.
Comment 7 Sudhir Khanger 2014-12-15 16:26:42 UTC
Instead of making Review a standard toolbar I like the idea of making Annotation tools as toolbar items that you can add to your toolbar. I just use Highlight and I would like quick access to it.

https://bugs.kde.org/show_bug.cgi?id=341914
Comment 8 Nate Graham 2020-06-04 13:01:36 UTC
Git commit 0b05d7ce990c1b5e17397f1515ba0364a773a43f by Nate Graham, on behalf of Simone Gaiarin.
Committed on 04/06/2020 at 13:01.
Pushed by ngraham into branch 'master'.

Overhaul annotations UX

Create a new new annotation toolbar to replace the current one as discussed in the task T8076.
Fixes:
Related: bug 386578, bug 374728, bug 352310, bug 330518, bug 341914, bug 358057, bug 412767, bug 413595, bug 420462
FIXED-IN: 1.11.0

Test Plan
Before testing this revision
Delete or Temporary move aside the following files:

~/.config/okularpartrc
~/.config/okularrc
~/.local/share/kxmlgui5/okular/part.rc
~/.local/share/kxmlgui5/okular/shell.rc

Nomenclature
Actions in the main toolbar:

Quick annotations
Actions in the annotation toolbar:

Annotation actions Highlighter, Underline, Squiggle, Strike out, Typewriter,
Inline note, Popup note, Freehand line, Arrow, Straight line, Rectangle, Ellipse,
Polygon, Stamp

Annotation config actions Line width, Color, Inner color, Opacity, Font, Annotation settings

Other actions Add to Quick Annotations, Pin

Autotests

 First run: annotation toolbar is not visible

 Selecting Tools > Annotations shows the annotation toolbar (below the main toolbar by default)

 Select an annotation > toolbar is shown

 Select a quick annotation > toolbar is shown

 Hide action (red cross) on the toolbar hides the toolbar

 Keys 1-9,0 select the (builtin) Annotation actions (one case tested)

 Keys Alt+1-9,0 select the quick annotation actions (one case tested)

 No annotation action selected: Quick Annotations is enabled, Add to quick annotations is disabled, Annotation config actions are disabled, Pin is enabled

 The current document is an image: Highlighter, Underline, Squiggle, Strike out are disabled (also in Quick annotations)

 The current document is protected: All actions are disabled

 Select annotation: the  Annotation config actions are enabled and their values set to the ones for the current annotation (taken from okularpartrc)

 Click an annotation action when none selected: browse mode is selected

 Click the currently selected annotation action: the action is unchecked and the tool disabled (back to browse mode)

 Click ESC: the currently selected annotation action is unchecked

 If Pin unchecked the selected annotation is unchecked after it has be used once and we are back to Browse mode

 The annotation systems works when multiple Okular tabs are open (the selected annotation is per-tab)

Manual tests

(TODO) Check that kconf_update updates the key AnnotationTools to QuickAnnotationTools in ~/.config/okularpartrc

Color icon is a format-text-color (if inline note or typewriter) or format-stroke-color for all other annotations
All actions have tooltips (some change based on the fact that the icon is enabled or not)
If a custom Line Width or Opacity is set through the Annotation Settings dialog, its value appears as a new checked action in the Line width or Opacity menu
If a custom stamp is selected through the Annotation Settings dialog, its name or filename (without path) appears as a new checked action in the Stamp menu
In Configure Okular > Annotations it is only possible to configure the quick annotations. Modifying them here updates the Quick annotations list after clicking Apply

The current document is an image: Highlighter, Underline, Squiggle, Strike out are disabled in Quick annotations
The state of Pin action is remembered across Okular launches
Selecting a quick action selects the corresponding action and loads its config values (color, line width, ...)
Setting the color and fill color works for all annotations (to be tested carefully, can be problematic for typewriter and inline note given the different internal mechanism to store the color in the settings)
Test stamp annotation (handled differently from the rest of the annotations)

Merge Request: https://invent.kde.org/graphics/okular/-/merge_requests/105

M  +2    -1    CMakeLists.txt
M  +7    -0    autotests/CMakeLists.txt
A  +373  -0    autotests/annotationtoolbartest.cpp     [License: GPL (v2+)]
A  +-    --    autotests/data/protected.pdf
M  +9    -16   autotests/parttest.cpp
M  +3    -3    conf/dlgannotations.cpp
M  +1    -1    conf/dlgannotationsbase.ui
M  +7    -2    conf/editannottooldialog.cpp
M  +5    -1    conf/editannottooldialog.h
M  +41   -0    conf/okular.kcfg
M  +5    -0    okular.upd
M  +3    -1    part.cpp
M  +26   -1    part.rc
M  +3    -3    shell/shell.cpp
M  +1    -0    shell/shell.h
A  +837  -0    ui/annotationactionhandler.cpp     [License: GPL (v2+)]
A  +51   -0    ui/annotationactionhandler.h     [License: GPL (v2+)]
M  +45   -22   ui/annotationwidgets.cpp
M  +6    -0    ui/annotationwidgets.h
M  +1    -0    ui/data/CMakeLists.txt
M  +104  -55   ui/data/tools.xml
A  +33   -0    ui/data/toolsQuick.xml
M  +28   -126  ui/pageview.cpp
M  +3    -2    ui/pageview.h
M  +314  -157  ui/pageviewannotator.cpp
M  +62   -26   ui/pageviewannotator.h
M  +2    -533  ui/pageviewutils.cpp
M  +0    -95   ui/pageviewutils.h
M  +2    -2    ui/side_reviews.cpp

https://invent.kde.org/graphics/okular/commit/0b05d7ce990c1b5e17397f1515ba0364a773a43f