aboutsummaryrefslogtreecommitdiff
path: root/lib/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'lib/webengine')
-rw-r--r--lib/webengine/CMakeLists.txt3
-rw-r--r--lib/webengine/webviewcontextmenu.cpp9
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/webengine/CMakeLists.txt b/lib/webengine/CMakeLists.txt
index ba3017f..3e5fa71 100644
--- a/lib/webengine/CMakeLists.txt
+++ b/lib/webengine/CMakeLists.txt
@@ -4,8 +4,7 @@ add_library(webengine STATIC
webview.h webview.cpp webviewcontextmenu.h webviewcontextmenu.cpp
urlinterceptor.h urlinterceptor.cpp)
target_include_directories(webengine PUBLIC ${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR})
-# autogen: required for context menu icons; TODO: move context menu to src/
-target_link_libraries(webengine PUBLIC Qt5::WebEngineWidgets autogen fmt)
+target_link_libraries(webengine PUBLIC Qt5::WebEngineWidgets fmt)
# tests
add_executable(profile_test test/profile.cpp)
diff --git a/lib/webengine/webviewcontextmenu.cpp b/lib/webengine/webviewcontextmenu.cpp
index c9d809f..83bad3b 100644
--- a/lib/webengine/webviewcontextmenu.cpp
+++ b/lib/webengine/webviewcontextmenu.cpp
@@ -9,7 +9,6 @@
#include "webviewcontextmenu.h"
#include "webprofilemanager.h"
#include "webview.h"
-#include "util.h"
#include <QContextMenuEvent>
#include <QDialog>
#include <QMenu>
@@ -54,7 +53,7 @@ WebViewContextMenu::WebViewContextMenu(WebView *view)
auto *backButton = new QToolButton(this);
backButton->setMinimumSize(button_size);
backButton->setEnabled(view->history()->canGoBack());
- backButton->setIcon(Util::icon<QStyle::SP_ArrowBack>());
+ backButton->setIcon(style()->standardIcon(QStyle::SP_ArrowBack));
connect(backButton, &QToolButton::clicked, view, [this, view]() {
view->back();
this->close();
@@ -64,7 +63,7 @@ WebViewContextMenu::WebViewContextMenu(WebView *view)
auto *forwardButton = new QToolButton(this);
forwardButton->setMinimumSize(button_size);
forwardButton->setEnabled(view->history()->canGoForward());
- forwardButton->setIcon(Util::icon<QStyle::SP_ArrowForward>());
+ forwardButton->setIcon(style()->standardIcon(QStyle::SP_ArrowForward));
connect(forwardButton, &QToolButton::clicked, view, [this, view]() {
view->forward();
this->close();
@@ -73,7 +72,7 @@ WebViewContextMenu::WebViewContextMenu(WebView *view)
auto *refreshButton = new QToolButton(this);
refreshButton->setMinimumSize(button_size);
- refreshButton->setIcon(Util::icon<QStyle::SP_BrowserReload>());
+ refreshButton->setIcon(style()->standardIcon(QStyle::SP_BrowserReload));
connect(refreshButton, &QToolButton::clicked, view, [view, this]() {
view->reload();
this->close();
@@ -86,7 +85,7 @@ WebViewContextMenu::WebViewContextMenu(WebView *view)
muteButton->setMinimumSize(button_size);
muteButton->setCheckable(true);
muteButton->setChecked(view->page()->isAudioMuted());
- muteButton->setIcon(Util::icon<QStyle::SP_MediaVolume>());
+ muteButton->setIcon(style()->standardIcon(QStyle::SP_MediaVolume));
connect(muteButton, &QToolButton::clicked, view, [view, this](bool checked) {
view->page()->setAudioMuted(checked);
this->close();