From ce6582c7618ec613ace6c0e7a70cce8e6e4f2ad1 Mon Sep 17 00:00:00 2001 From: Bharadwaj Raju Date: Thu, 14 Oct 2021 18:22:19 +0000 Subject: [PATCH] Change labels of selection and annotation tools to be imperative This makes them conform to the HIG and also looks cleaner. --- doc/index.docbook | 34 ++++++++++++++++---------------- part/annotationactionhandler.cpp | 28 +++++++++++++------------- part/data/toolsQuick.xml | 8 ++++---- part/pageview.cpp | 8 ++++---- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/doc/index.docbook b/doc/index.docbook index 67baf0cc1..ad34c58d9 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -514,9 +514,9 @@ Context menu actions like Rename Bookmarks etc.) &okular; has two different kind of annotations: - Text annotations like Yellow Highlighter and Black Underlining + Text annotations like Highlight in Yellow and Underline for files with text like ⪚ &PDF;. - Graphic annotations like Pop-up Note, Inline Note, Freehand Line, Highlighter, Straight Line, Polygon, Stamp, Underline, Ellipse, and Typewriter for all formats supported by &okular;. + Graphic annotations like Pop-up Note, Inline Note, Freehand Line, Highlight, Straight Line, Polygon, Stamp, Underline, Ellipse, and Insert Text for all formats supported by &okular;. Using the context menu either in the Annotations view of the sidebar or in the main window you can open a Pop up Note for any kind of annotation and add or edit comments. Annotations are not only limited to &PDF; files, they can be used for any format &okular; supports. @@ -579,7 +579,7 @@ Context menu actions like Rename Bookmarks etc.) - Highlighter + Highlight @@ -687,18 +687,18 @@ Context menu actions like Rename Bookmarks etc.) - Typewriter + Insert Text - Typewriter features opaque letters on transparent background, so that it is useful to fill noninteractive forms. + Insert Text features opaque letters on transparent background, which is useful to fill noninteractive forms. Click on the tool button, then click with the &LMB; and hold to place the top-left corner of the note, then drag to place the bottom-right one. Enter the text of the note then click on the OK to save the note, Cancel to cancel note entering or Clear to clear the note. - It is possible to define the Font and Text color for the text. Just right-click on the typewriter text created and select the Properties menu item. + It is possible to define the Font and Text color for the text. Just right-click on the text inserted and select the Properties menu item. @@ -714,7 +714,7 @@ Context menu actions like Rename Bookmarks etc.) - Inline Note + Insert Inline Note @@ -741,7 +741,7 @@ Context menu actions like Rename Bookmarks etc.) - Pop-up Note + Insert Pop-up Note @@ -768,7 +768,7 @@ Context menu actions like Rename Bookmarks etc.) - Freehand Line + Draw Freehand Line @@ -795,7 +795,7 @@ Context menu actions like Rename Bookmarks etc.) - Arrow (drop-down list) + Draw Arrow (drop-down list) @@ -822,7 +822,7 @@ Context menu actions like Rename Bookmarks etc.) - Straight line (drop-down list) + Draw Straight line (drop-down list) @@ -849,7 +849,7 @@ Context menu actions like Rename Bookmarks etc.) - Rectangle (drop-down list) + Draw Rectangle (drop-down list) @@ -876,7 +876,7 @@ Context menu actions like Rename Bookmarks etc.) - Ellipse (drop-down list) + Draw Ellipse (drop-down list) @@ -903,7 +903,7 @@ Context menu actions like Rename Bookmarks etc.) - Polygon (drop-down list) + Draw Polygon (drop-down list) @@ -1257,7 +1257,7 @@ Context menu actions like Rename Bookmarks etc.) else on the annotation to move it. Pressing &Esc; or clicking an area outside the annotation cancels a selection. - Resizing is only applicable for annotation types Inline Note, Typewriter, Stamp and Ellipse. + Resizing is only applicable for annotation types Inline Note, Insert Text, Stamp and Ellipse. @@ -1682,7 +1682,7 @@ Context menu actions like Rename Bookmarks etc.) Copy the currently selected text in - Text Selection mode to the clipboard. + Select Text mode to the clipboard. @@ -1698,7 +1698,7 @@ Context menu actions like Rename Bookmarks etc.) Selects all the text (if the document provides it). This works only in - Text Selection mode. + Select Text mode. diff --git a/part/annotationactionhandler.cpp b/part/annotationactionhandler.cpp index 54d21f4f5..8f5571c69 100644 --- a/part/annotationactionhandler.cpp +++ b/part/annotationactionhandler.cpp @@ -545,26 +545,26 @@ AnnotationActionHandler::AnnotationActionHandler(PageViewAnnotator *parent, KAct d->annotator = parent; // toolbar visibility actions - d->aToolBarVisibility = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-freehand")), i18n("&Annotations"), this); + d->aToolBarVisibility = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-freehand")), i18nc("verb", "&Annotate"), this); d->aHideToolBar = new QAction(QIcon::fromTheme(QStringLiteral("dialog-close")), i18nc("@action:intoolbar Hide the toolbar", "Hide"), this); d->aShowToolBar = new QAction(QIcon::fromTheme(QStringLiteral("draw-freehand")), i18nc("@action:intoolbar Show the builtin annotation toolbar", "Show more annotation tools"), this); // Text markup actions - KToggleAction *aHighlighter = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-highlight")), i18nc("@action:intoolbar Annotation tool", "Highlighter"), this); - KToggleAction *aUnderline = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-underline")), i18nc("@action:intoolbar Annotation tool", "Underline"), this); - KToggleAction *aSquiggle = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-underline-squiggle")), i18nc("@action:intoolbar Annotation tool", "Squiggle"), this); - KToggleAction *aStrikeout = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-strikethrough")), i18nc("@action:intoolbar Annotation tool", "Strike Out"), this); + KToggleAction *aHighlighter = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-highlight")), i18nc("@action:intoolbar Annotation tool, verb", "Highlight"), this); + KToggleAction *aUnderline = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-underline")), i18nc("@action:intoolbar Annotation tool, verb", "Underline"), this); + KToggleAction *aSquiggle = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-underline-squiggle")), i18nc("@action:intoolbar Annotation tool, verb", "Squiggle"), this); + KToggleAction *aStrikeout = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-strikethrough")), i18nc("@action:intoolbar Annotation tool, verb", "Strike Out"), this); // Notes actions - KToggleAction *aTypewriter = new KToggleAction(QIcon::fromTheme(QStringLiteral("tool-text")), i18nc("@action:intoolbar Annotation tool", "Typewriter"), this); - KToggleAction *aInlineNote = new KToggleAction(QIcon::fromTheme(QStringLiteral("note")), i18nc("@action:intoolbar Annotation tool", "Inline Note"), this); - KToggleAction *aPopupNote = new KToggleAction(QIcon::fromTheme(QStringLiteral("edit-comment")), i18nc("@action:intoolbar Annotation tool", "Popup Note"), this); - KToggleAction *aFreehandLine = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-freehand")), i18nc("@action:intoolbar Annotation tool", "Freehand Line"), this); + KToggleAction *aTypewriter = new KToggleAction(QIcon::fromTheme(QStringLiteral("tool-text")), i18nc("@action:intoolbar Annotation tool, verb", "Insert Text"), this); + KToggleAction *aInlineNote = new KToggleAction(QIcon::fromTheme(QStringLiteral("note")), i18nc("@action:intoolbar Annotation tool, verb", "Insert Inline Note"), this); + KToggleAction *aPopupNote = new KToggleAction(QIcon::fromTheme(QStringLiteral("edit-comment")), i18nc("@action:intoolbar Annotation tool, verb", "Insert Popup Note"), this); + KToggleAction *aFreehandLine = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-freehand")), i18nc("@action:intoolbar Annotation tool, verb", "Draw Freehand Line"), this); // Geometrical shapes actions - KToggleAction *aStraightLine = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-line")), i18nc("@action:intoolbar Annotation tool", "Straight line"), this); - KToggleAction *aArrow = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-arrow")), i18nc("@action:intoolbar Annotation tool", "Arrow"), this); - KToggleAction *aRectangle = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-rectangle")), i18nc("@action:intoolbar Annotation tool", "Rectangle"), this); - KToggleAction *aEllipse = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-ellipse")), i18nc("@action:intoolbar Annotation tool", "Ellipse"), this); - KToggleAction *aPolygon = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-polyline")), i18nc("@action:intoolbar Annotation tool", "Polygon"), this); + KToggleAction *aStraightLine = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-line")), i18nc("@action:intoolbar Annotation tool, verb", "Draw Straight line"), this); + KToggleAction *aArrow = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-arrow")), i18nc("@action:intoolbar Annotation tool, verb", "Draw Arrow"), this); + KToggleAction *aRectangle = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-rectangle")), i18nc("@action:intoolbar Annotation tool, verb", " Draw Rectangle"), this); + KToggleAction *aEllipse = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-ellipse")), i18nc("@action:intoolbar Annotation tool, verb", "Draw Ellipse"), this); + KToggleAction *aPolygon = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-polyline")), i18nc("@action:intoolbar Annotation tool, verb", "Draw Polygon"), this); d->aGeomShapes = new ToggleActionMenu(i18nc("@action", "Geometrical shapes"), this); d->aGeomShapes->setEnabled(true); // Need to explicitly set this once, or refreshActions() in part.cpp will disable this action #if KWIDGETSADDONS_VERSION < QT_VERSION_CHECK(5, 77, 0) diff --git a/part/data/toolsQuick.xml b/part/data/toolsQuick.xml index d4e7329c0..b8313be0c 100644 --- a/part/data/toolsQuick.xml +++ b/part/data/toolsQuick.xml @@ -6,12 +6,12 @@ Tool [id] {int = unique id identifying the quick tool} --> - + - + @@ -26,12 +26,12 @@ Tool - + - + diff --git a/part/pageview.cpp b/part/pageview.cpp index ac5d24e88..c8e9db7ca 100644 --- a/part/pageview.cpp +++ b/part/pageview.cpp @@ -683,28 +683,28 @@ void PageView::setupActions(KActionCollection *ac) ac->setDefaultShortcuts(d->aZoomOut, KStandardShortcut::zoomOut()); // Mouse-Mode actions - d->aMouseSelect = new QAction(QIcon::fromTheme(QStringLiteral("select-rectangular")), i18n("Area &Selection"), this); + d->aMouseSelect = new QAction(QIcon::fromTheme(QStringLiteral("select-rectangular")), i18nc("verb", "&Select Area"), this); ac->addAction(QStringLiteral("mouse_select"), d->aMouseSelect); connect(d->aMouseSelect, &QAction::triggered, this, &PageView::slotSetMouseSelect); d->aMouseSelect->setCheckable(true); ac->setDefaultShortcut(d->aMouseSelect, Qt::CTRL | Qt::Key_3); d->aMouseSelect->setActionGroup(d->mouseModeActionGroup); - d->aMouseTextSelect = new QAction(QIcon::fromTheme(QStringLiteral("edit-select-text")), i18n("&Text Selection"), this); + d->aMouseTextSelect = new QAction(QIcon::fromTheme(QStringLiteral("edit-select-text")), i18nc("verb", "Select &Text"), this); ac->addAction(QStringLiteral("mouse_textselect"), d->aMouseTextSelect); connect(d->aMouseTextSelect, &QAction::triggered, this, &PageView::slotSetMouseTextSelect); d->aMouseTextSelect->setCheckable(true); ac->setDefaultShortcut(d->aMouseTextSelect, Qt::CTRL | Qt::Key_4); d->aMouseTextSelect->setActionGroup(d->mouseModeActionGroup); - d->aMouseTableSelect = new QAction(QIcon::fromTheme(QStringLiteral("table")), i18n("T&able Selection"), this); + d->aMouseTableSelect = new QAction(QIcon::fromTheme(QStringLiteral("table")), i18nc("verb", "Select T&able"), this); ac->addAction(QStringLiteral("mouse_tableselect"), d->aMouseTableSelect); connect(d->aMouseTableSelect, &QAction::triggered, this, &PageView::slotSetMouseTableSelect); d->aMouseTableSelect->setCheckable(true); ac->setDefaultShortcut(d->aMouseTableSelect, Qt::CTRL | Qt::Key_5); d->aMouseTableSelect->setActionGroup(d->mouseModeActionGroup); - d->aMouseMagnifier = new QAction(QIcon::fromTheme(QStringLiteral("document-preview")), i18n("&Magnifier"), this); + d->aMouseMagnifier = new QAction(QIcon::fromTheme(QStringLiteral("document-preview")), i18nc("verb", "&Magnify"), this); ac->addAction(QStringLiteral("mouse_magnifier"), d->aMouseMagnifier); connect(d->aMouseMagnifier, &QAction::triggered, this, &PageView::slotSetMouseMagnifier); d->aMouseMagnifier->setCheckable(true);