summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineview.cpp
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2018-10-01 16:56:37 +0200
committerSzabolcs David <davidsz@inf.u-szeged.hu>2018-11-14 14:41:00 +0000
commit9e4fefbc9a8c23dcd7fa3a58328f39a4bcd35b42 (patch)
tree7677f3e0eb7d06bc7778622fd06bacbb2507fdf3 /src/webengine/api/qquickwebengineview.cpp
parent86776c4ee93310837e86b80d6b71f85f12228d9d (diff)
Add standard icon names to Quick web actions
Freedesktop.org has provided an icon naming specification to standardize access to system themes in various desktop environments. Add standard names where it is possible and remove non-standard ones. https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html Change-Id: Ib0ea2364eb45e05bad6a521b8af7263283893198 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webengine/api/qquickwebengineview.cpp')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 3bc0be196..d9667a643 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -1844,6 +1844,7 @@ QQuickWebEngineAction *QQuickWebEngineView::action(WebAction action)
break;
case Stop:
text = tr("Stop");
+ iconName = QStringLiteral("process-stop");
break;
case Reload:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::Reload);
@@ -1851,28 +1852,35 @@ QQuickWebEngineAction *QQuickWebEngineView::action(WebAction action)
break;
case ReloadAndBypassCache:
text = tr("Reload and Bypass Cache");
+ iconName = QStringLiteral("view-refresh");
break;
case Cut:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::Cut);
- iconName = QStringLiteral("Cut");
+ iconName = QStringLiteral("edit-cut");
break;
case Copy:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::Copy);
+ iconName = QStringLiteral("edit-copy");
break;
case Paste:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::Paste);
+ iconName = QStringLiteral("edit-paste");
break;
case Undo:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::Undo);
+ iconName = QStringLiteral("edit-undo");
break;
case Redo:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::Redo);
+ iconName = QStringLiteral("edit-redo");
break;
case SelectAll:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::SelectAll);
+ iconName = QStringLiteral("edit-select-all");
break;
case PasteAndMatchStyle:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::PasteAndMatchStyle);
+ iconName = QStringLiteral("edit-paste");
break;
case OpenLinkInThisWindow:
text = tr("Open link in this window");
@@ -1909,9 +1917,11 @@ QQuickWebEngineAction *QQuickWebEngineView::action(WebAction action)
break;
case ToggleMediaPlayPause:
text = tr("Toggle Play/Pause");
+ iconName = QStringLiteral("media-playback-start");
break;
case ToggleMediaMute:
text = tr("Toggle Mute");
+ iconName = QStringLiteral("audio-volume-muted");
break;
case DownloadMediaToDisk:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::DownloadMediaToDisk);
@@ -1921,31 +1931,38 @@ QQuickWebEngineAction *QQuickWebEngineView::action(WebAction action)
break;
case ExitFullScreen:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::ExitFullScreen);
+ iconName = QStringLiteral("view-fullscreen");
break;
case RequestClose:
text = tr("Close Page");
+ iconName = QStringLiteral("window-close");
break;
case Unselect:
text = tr("Unselect");
+ iconName = QStringLiteral("edit-select-none");
break;
case SavePage:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::SavePage);
+ iconName = QStringLiteral("document-save");
break;
case ViewSource:
text = RenderViewContextMenuQt::getMenuItemName(RenderViewContextMenuQt::ContextMenuItem::ViewSource);
- iconName = QStringLiteral("view-source");
break;
case ToggleBold:
text = tr("&Bold");
+ iconName = QStringLiteral("format-text-bold");
break;
case ToggleItalic:
text = tr("&Italic");
+ iconName = QStringLiteral("format-text-italic");
break;
case ToggleUnderline:
text = tr("&Underline");
+ iconName = QStringLiteral("format-text-underline");
break;
case ToggleStrikethrough:
text = tr("&Strikethrough");
+ iconName = QStringLiteral("format-text-strikethrough");
break;
case AlignLeft:
text = tr("Align &Left");
@@ -1961,9 +1978,11 @@ QQuickWebEngineAction *QQuickWebEngineView::action(WebAction action)
break;
case Indent:
text = tr("&Indent");
+ iconName = QStringLiteral("format-indent-more");
break;
case Outdent:
text = tr("&Outdent");
+ iconName = QStringLiteral("format-indent-less");
break;
case InsertOrderedList:
text = tr("Insert &Ordered List");