]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/commitdiff
Fix missing icons on Gnome. https://redmine.stoutner.com/issues/993
authorSoren Stoutner <soren@stoutner.com>
Mon, 17 Apr 2023 18:50:14 +0000 (11:50 -0700)
committerSoren Stoutner <soren@stoutner.com>
Mon, 17 Apr 2023 18:50:14 +0000 (11:50 -0700)
src/dialogs/SaveDialog.cpp
src/dialogs/SaveDialog.h
src/icons/privacybrowser-symbolic.svg
src/icons/sc-apps-privacybrowser.svg
src/ui.rcs/browserwindowui.rc
src/widgets/TabWidget.cpp
src/widgets/TabWidget.h
src/windows/BrowserWindow.cpp

index f1c1d99c6bd51930bdc670e8f1e0c96b957c3c43..5e969164e508e2b13f0c7fbfedb5ae169ddb2510 100644 (file)
@@ -113,7 +113,7 @@ SaveDialog::SaveDialog(QUrl &url, QString &mimeTypeString, int totalBytes, QStri
 void SaveDialog::showFilePicker()
 {
     // Show the file picker dialog.
-    emit useNativeDownloader(downloadUrl, suggestedFileName);
+    emit useNativeKdeDownloader(downloadUrl, suggestedFileName);
 
     // Close the dialog.
     reject();
index 1f4ae2e418d94ea968d92a7e262e3ee4305749d8..a3ce8416b18b27835b5d5cc2e35b6caa8d869e34 100644 (file)
@@ -36,7 +36,7 @@ public:
 
 signals:
     // The signals.
-    void useNativeDownloader(QUrl &downloadUrl, QString &suggestedFileName);
+    void useNativeKdeDownloader(QUrl &downloadUrl, QString &suggestedFileName);
 
 private Q_SLOTS:
     // The private slots.
index 099237d22a37e22bcb32e886e335bba5891a2fe5..9649f6f47bc1c6ca9b4063bc59e5ac5c75114196 100644 (file)
@@ -29,4 +29,4 @@
   You should have received a copy of the GNU General Public License
   along with Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>.
 
-  This copyright notice is moved to the bottom of the file to make Gnome's SVG parser happy.-->
+  This copyright notice is moved to the bottom of the file to make Gnome's SVG parser happy. -->
index a9b4e7ea8c78342f59970506e286961ac87a463d..19bf69f35610f0e26d9ce3cbfb0f78a89cb96380 100644 (file)
@@ -1,25 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 
-<!--
-  Copyright 2016-2017,2021-2023 Soren Stoutner <soren@stoutner.com>.
-
-  This file is derived from `security` and `language`, which are part of the Android Material icon set.  They are released under the Apache License 2.0.  <https://fonts.google.com/icons>
-
-  This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
-
-  Privacy Browser PC is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser PC is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>. -->
-
 <svg
     xmlns="http://www.w3.org/2000/svg"
     viewBox="0 0 256 256" >
             d="m 127.92021,-183.78553 c -44.041614,0 -79.705747,35.74391 -79.705747,79.78553 0,44.041617 35.664133,79.785537 79.705747,79.785537 44.1214,0 79.86533,-35.74392 79.86533,-79.785537 0,-44.04162 -35.74393,-79.78553 -79.86533,-79.78553 z m 55.29138,47.87132 h -23.53674 c -2.55313,-9.9732 -6.22326,-19.54746 -11.0104,-28.40365 14.68055,5.02648 26.88773,15.23903 34.54714,28.40365 z M 128,-167.50929 c 6.6222,9.57427 11.80825,20.18574 15.23903,31.59508 h -30.47807 c 3.43078,-11.40934 8.61684,-22.02081 15.23904,-31.59508 z M 66.245993,-88.042889 C 64.969425,-93.149168 64.171571,-98.494798 64.171571,-104 c 0,-5.5052 0.797855,-10.85083 2.074422,-15.95711 h 26.96751 c -0.63829,5.26585 -1.117,10.5317 -1.117,15.95711 0,5.425417 0.47872,10.691263 1.117,15.957111 z m 6.542412,15.957108 H 96.32514 c 2.553137,9.973191 6.22327,19.547449 11.0104,28.403644 C 92.655006,-48.708619 80.44782,-58.841391 72.788405,-72.085781 Z M 96.32514,-135.91421 H 72.788405 c 7.659415,-13.2444 19.866601,-23.37717 34.547135,-28.40365 -4.78713,8.85619 -8.457263,18.43045 -11.0104,28.40365 z M 128,-40.49071 c -6.6222,-9.574268 -11.80826,-20.185747 -15.23904,-31.595071 h 30.47807 C 139.80825,-60.676457 134.6222,-50.064978 128,-40.49071 Z m 18.66982,-47.552179 h -37.33964 c -0.71801,-5.265848 -1.27656,-10.531694 -1.27656,-15.957111 0,-5.42541 0.55854,-10.77105 1.27656,-15.95711 h 37.33964 c 0.71811,5.18606 1.27656,10.5317 1.27656,15.95711 0,5.425417 -0.55844,10.691263 -1.27656,15.957111 z m 1.99463,44.360752 c 4.78714,-8.856195 8.45727,-18.430453 11.0104,-28.403644 h 23.53674 c -7.65941,13.164605 -19.86659,23.377162 -34.54714,28.403644 z m 14.12204,-44.360752 c 0.63828,-5.265848 1.117,-10.531694 1.117,-15.957111 0,-5.42541 -0.47871,-10.69126 -1.117,-15.95711 h 26.96752 c 1.27656,5.10628 2.07441,10.45191 2.07441,15.95711 0,5.505202 -0.79784,10.850832 -2.07441,15.957111 z" />
     </g>
 </svg>
+
+<!--
+  Copyright 2016-2017,2021-2023 Soren Stoutner <soren@stoutner.com>.
+
+  This file is derived from `security` and `language`, which are part of the Android Material icon set.  They are released under the Apache License 2.0.  <https://fonts.google.com/icons>
+
+  This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+
+  Privacy Browser PC is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser PC is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>.
+
+  This copyright notice is moved to the bottom of the file to make Gnome's SVG parser happy. -->
index 186b784200bcf957b5b81194b8b87bcecc140d2f..12eb32d72ab4a6fd2e01bdc3ca58f3717a316eac 100644 (file)
@@ -38,7 +38,7 @@
 
         <!-- On-the-fly Settings. -->
         <Menu name="on_the_fly_settings"> <text>On-The-Fly Settings</text>
-            <Menu name="user_agent" icon="user-group-properties">
+            <Menu name="user_agent">
                 <Action name="user_agent_privacy_browser" />
                 <Action name="user_agent_webengine_default" />
                 <Action name="user_agent_firefox_linux" />
@@ -54,7 +54,7 @@
 
             <Separator />
 
-            <Menu name="search_engine" icon="search">
+            <Menu name="search_engine">
                 <Action name="search_engine_mojeek" />
                 <Action name="search_engine_monocles" />
                 <Action name="search_engine_metager" />
index 76ff617c3e180f3e253884d277dfd2a536f94dce..cbb84b3dfe3c9d9f081da5870c48d662b1dbe039 100644 (file)
@@ -49,6 +49,22 @@ QString TabWidget::webEngineDefaultUserAgent = QLatin1String("");
 // Construct the class.
 TabWidget::TabWidget(QWidget *parent) : QWidget(parent)
 {
+    // Create a QProcess to check if KDE is running.
+    QProcess *checkIfRunningKdeQProcessPointer = new QProcess();
+
+    // Create an argument string list that contains `ksmserver` (KDE Session Manager).
+    QStringList argument = QStringList(QLatin1String("ksmserver"));
+
+    // Run `pidof` to check for the presence of `ksmserver`.
+    checkIfRunningKdeQProcessPointer->start(QLatin1String("pidof"), argument);
+
+    // Monitor any standard output.
+    connect(checkIfRunningKdeQProcessPointer, &QProcess::readyReadStandardOutput, [this]
+    {
+        // If there is any standard output, `ksmserver` is running.
+        isRunningKde = true;
+    });
+
     // Instantiate the user agent helper.
     userAgentHelperPointer = new UserAgentHelper();
 
@@ -169,7 +185,7 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const
     QWebEngineSettings *webEngineSettingsPointer = webEnginePagePointer->settings();
 
     // Update the URL line edit when the URL changes.
-    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::urlChanged, [privacyWebEngineViewPointer, this] (const QUrl &newUrl)
+    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::urlChanged, [this, privacyWebEngineViewPointer] (const QUrl &newUrl)
     {
         // Only update the UI if this is the current tab.
         if (privacyWebEngineViewPointer == currentPrivacyWebEngineViewPointer)
@@ -198,7 +214,7 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const
     });
 
     // Connect the loading favorite icon movie to the tab icon.
-    connect(loadingFavoriteIconMoviePointer, &QMovie::frameChanged, [privacyWebEngineViewPointer, this]
+    connect(loadingFavoriteIconMoviePointer, &QMovie::frameChanged, [this, privacyWebEngineViewPointer]
     {
         // Get the index for this tab.
         int tabIndex = qTabWidgetPointer->indexOf(privacyWebEngineViewPointer);
@@ -209,7 +225,7 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const
     });
 
     // Update the icon when it changes.
-    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::iconChanged, [privacyWebEngineViewPointer, this] (const QIcon &newFavoriteIcon)
+    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::iconChanged, [this, privacyWebEngineViewPointer] (const QIcon &newFavoriteIcon)
     {
         // Store the favorite icon in the privacy web engine view.
         if (newFavoriteIcon.isNull())
@@ -228,7 +244,7 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const
     });
 
     // Update the progress bar and the favorite icon when a load is started.
-    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadStarted, [privacyWebEngineViewPointer, this] ()
+    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadStarted, [this, privacyWebEngineViewPointer] ()
     {
         // Set the privacy web engine view to be loading.
         privacyWebEngineViewPointer->isLoading = true;
@@ -245,7 +261,7 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const
     });
 
     // Update the progress bar when a load progresses.
-    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadProgress, [privacyWebEngineViewPointer, this] (const int progress)
+    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadProgress, [this, privacyWebEngineViewPointer] (const int progress)
     {
         // Store the load progress.
         privacyWebEngineViewPointer->loadProgressInt = progress;
@@ -256,7 +272,7 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const
     });
 
     // Update the progress bar when a load finishes.
-    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadFinished, [privacyWebEngineViewPointer, this] ()
+    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadFinished, [this, privacyWebEngineViewPointer] ()
     {
         // Set the privacy web engine view to be not loading.
         privacyWebEngineViewPointer->isLoading = false;
@@ -294,7 +310,7 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const
     });
 
     // Display HTTP Ping blocked dialogs.
-    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::displayHttpPingBlockedDialog, [privacyWebEngineViewPointer, this] (const QString &httpPingUrl)
+    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::displayHttpPingBlockedDialog, [this, privacyWebEngineViewPointer] (const QString &httpPingUrl)
     {
         // Only display the HTTP Ping blocked dialog if this is the current tab.
         if (privacyWebEngineViewPointer == currentPrivacyWebEngineViewPointer)
@@ -391,7 +407,7 @@ PrivacyWebEngineView* TabWidget::addTab(const bool removeUrlLineEditFocus, const
     webEngineSettingsPointer->setAttribute(QWebEngineSettings::PluginsEnabled, true);
 
     // Update the cookies action.
-    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::updateCookiesAction, [privacyWebEngineViewPointer, this] (const int numberOfCookies)
+    connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::updateCookiesAction, [this, privacyWebEngineViewPointer] (const int numberOfCookies)
     {
         // Update the cookie action if the specified privacy WebEngine view is the current privacy WebEngine view.
         if (privacyWebEngineViewPointer == currentPrivacyWebEngineViewPointer)
@@ -587,7 +603,7 @@ void TabWidget::findText(const QString &text) const
 
 void TabWidget::findTextFinished(const QWebEngineFindTextResult &findTextResult)
 {
-    // Update the find text UI if it wasn't simply wiping the current find text selection.  Otherwise the UI temporarially flashes `0/0`.
+    // Update the find text UI if it wasn't simply wiping the current find text selection.  Otherwise the UI temporarily flashes `0/0`.
     if (wipingCurrentFindTextSelection)  // The current selection is being wiped.
     {
         // Reset the flag.
@@ -799,8 +815,8 @@ void TabWidget::showSaveDialog(QWebEngineDownloadItem *webEngineDownloadItemPoin
     QString suggestedFileName = webEngineDownloadItemPointer->suggestedFileName();
     int totalBytes = webEngineDownloadItemPointer->totalBytes();
 
-    // Check to see if local storage (cookies) is enabled.
-    if (currentPrivacyWebEngineViewPointer->localStorageEnabled)  // Local storage (cookies) is enabled.  Use WebEngine's downloader.
+    // Check to see if Privacy Browser is not running KDE or if local storage (cookies) is enabled.
+    if (!isRunningKde || currentPrivacyWebEngineViewPointer->localStorageEnabled)  // KDE is not running or local storage (cookies) is enabled.  Use WebEngine's downloader.
     {
         // Instantiate the save dialog.
         SaveDialog *saveDialogPointer = new SaveDialog(downloadUrl, mimeTypeString, totalBytes);
@@ -818,7 +834,7 @@ void TabWidget::showSaveDialog(QWebEngineDownloadItem *webEngineDownloadItemPoin
             if (downloadDirectory == QLatin1String("System Download Directory"))
                 downloadDirectory = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
 
-            // Display a save file dialog.
+            // Get a file path from the file picker.
             QString saveFilePath = QFileDialog::getSaveFileName(this, i18nc("Save file dialog caption", "Save File"), downloadDirectory + QLatin1Char('/') + suggestedFileName);
 
             // Process the save file path.
@@ -938,14 +954,14 @@ void TabWidget::showSaveDialog(QWebEngineDownloadItem *webEngineDownloadItemPoin
             webEngineDownloadItemPointer->cancel();
         }
     }
-    else  // Local storage (cookies) is disabled.  Use KDE's native downloader.
+    else  // KDE is running and local storage (cookies) is disabled.  Use KDE's native downloader.
           // This must use the show command to launch a separate dialog which cancels WebEngine's automatic background download of the file to a temporary location.
     {
         // Instantiate the save dialog.  `true` instructs it to use the native downloader
         SaveDialog *saveDialogPointer = new SaveDialog(downloadUrl, mimeTypeString, totalBytes, suggestedFileName, true);
 
         // Connect the save button.
-        connect(saveDialogPointer, SIGNAL(useNativeDownloader(QUrl &, QString &)), this, SLOT(useNativeDownloader(QUrl &, QString &)));
+        connect(saveDialogPointer, SIGNAL(useNativeKdeDownloader(QUrl &, QString &)), this, SLOT(useNativeKdeDownloader(QUrl &, QString &)));
 
         // Show the dialog.
         saveDialogPointer->show();
@@ -1057,7 +1073,7 @@ void TabWidget::updateUiWithTabSettings()
         emit hideProgressBar();
 }
 
-void TabWidget::useNativeDownloader(QUrl &downloadUrl, QString &suggestedFileName)
+void TabWidget::useNativeKdeDownloader(QUrl &downloadUrl, QString &suggestedFileName)
 {
     // Get the download directory.
     QString downloadDirectory = Settings::downloadLocation();
index 578206ccc6ba31885c6b42a9da70f96fd5f44863..f0efc1d4242e4649edcec69fbcb5587f98b12035 100644 (file)
@@ -123,7 +123,7 @@ private Q_SLOTS:
     void showSaveDialog(QWebEngineDownloadItem *downloadItemPointer);
     void updateUiFromWebEngineView(const PrivacyWebEngineView *privacyWebEngineViewPointer) const;
     void updateUiWithTabSettings();
-    void useNativeDownloader(QUrl &downloadUrl, QString &suggestedFileName);
+    void useNativeKdeDownloader(QUrl &downloadUrl, QString &suggestedFileName);
 
 private:
     // The private variables.
@@ -134,6 +134,7 @@ private:
     QWebEngineProfile *currentWebEngineProfilePointer;
     QWebEngineSettings *currentWebEngineSettingsPointer;
     QIcon defaultFavoriteIcon = QIcon::fromTheme(QStringLiteral("globe"));
+    bool isRunningKde = false;
     QMovie *loadingFavoriteIconMoviePointer;
     QString searchEngineUrl;
     QTabWidget *qTabWidgetPointer;
index fcca8e8f70351ef7c91b544ee524861b72ff9b1f..6347ec404cadf44203b22dc6d0867663714cc00c 100644 (file)
@@ -172,30 +172,36 @@ BrowserWindow::BrowserWindow(bool firstWindow) : KXmlGuiWindow()
     findCaseSensitiveActionPointer->setText(i18nc("Find Case Sensitive action", "Find Case Sensitive"));
     hideFindTextActionPointer->setText(i18nc("Hide Find Text action", "Hide Find Text"));
 
-    // Set the action icons.
+    // Set the action icons.  Gnome doesn't contain some of the icons that KDE has.
+    // The toolbar icons don't pick up unless the size is explicit, probably because the toolbar ends up being an intermediate size.
     newTabActionPointer->setIcon(QIcon::fromTheme(QLatin1String("tab-new")));
     newWindowActionPointer->setIcon(QIcon::fromTheme(QLatin1String("window-new")));
-    userAgentPrivacyBrowserActionPointer->setIcon(QIcon(":/icons/privacy-mode"));
-    userAgentWebEngineDefaultActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties")));
-    userAgentFirefoxLinuxActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr")));
-    userAgentChromiumLinuxActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium")));
-    userAgentFirefoxWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr")));
-    userAgentChromeWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium")));
-    userAgentEdgeWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties")));
-    userAgentSafariMacosActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties")));
-    userAgentCustomActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties")));
-    searchEngineMojeekActionPointer->setIcon(QIcon::fromTheme(QLatin1String("search")));
-    searchEngineMonoclesActionPointer->setIcon(QIcon::fromTheme(QLatin1String("search")));
-    searchEngineMetagerActionPointer->setIcon(QIcon::fromTheme(QLatin1String("search")));
-    searchEngineGoogleActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-google")));
-    searchEngineBingActionPointer->setIcon(QIcon::fromTheme(QLatin1String("search")));
-    searchEngineYahooActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-yahoo")));
-    searchEngineCustomActionPointer->setIcon(QIcon::fromTheme(QLatin1String("search")));
-    zoomFactorActionPointer->setIcon(QIcon::fromTheme(QLatin1String("zoom")));
-    domainSettingsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("settings-configure")));
-    cookiesActionPointer->setIcon(QIcon::fromTheme(QLatin1String("preferences-web-browser-cookies")));
-    domStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("code-class")));
-    findCaseSensitiveActionPointer->setIcon(QIcon::fromTheme(QLatin1String("format-text-lowercase")));
+    userAgentPrivacyBrowserActionPointer->setIcon(QIcon(":/icons/privacy-mode.svg"));
+    userAgentWebEngineDefaultActionPointer->setIcon(QIcon::fromTheme(QLatin1String("qtlogo"), QIcon::fromTheme(QLatin1String("user-group-properties"),
+                                                                                                               QIcon::fromTheme(QLatin1String("contact-new")))));
+    userAgentFirefoxLinuxActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr"), QIcon::fromTheme(QLatin1String("user-group-properties"),
+                                                                                                                QIcon::fromTheme(QLatin1String("contact-new")))));
+    userAgentChromiumLinuxActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium"), QIcon::fromTheme(QLatin1String("user-group-properties"),
+                                                                                                              QIcon::fromTheme(QLatin1String("contact-new")))));
+    userAgentFirefoxWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr"), QIcon::fromTheme(QLatin1String("user-group-properties"),
+                                                                                                                  QIcon::fromTheme(QLatin1String("contact-new")))));
+    userAgentChromeWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium"), QIcon::fromTheme(QLatin1String("user-group-properties"),
+                                                                                                              QIcon::fromTheme(QLatin1String("contact-new")))));
+    userAgentEdgeWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+    userAgentSafariMacosActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+    userAgentCustomActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+    searchEngineMojeekActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+    searchEngineMonoclesActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+    searchEngineMetagerActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+    searchEngineGoogleActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-google"), QIcon::fromTheme(QLatin1String("edit-find"))));
+    searchEngineBingActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+    searchEngineYahooActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-yahoo"), QIcon::fromTheme(QLatin1String("edit-find"))));
+    searchEngineCustomActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+    zoomFactorActionPointer->setIcon(QIcon::fromTheme(QLatin1String("zoom-fit-best")));
+    domainSettingsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("settings-configure"), QIcon::fromTheme(QLatin1String("preferences-desktop"))));
+    cookiesActionPointer->setIcon(QIcon::fromTheme(QLatin1String("preferences-web-browser-cookies"), QIcon::fromTheme(QLatin1String("appointment-new"))));
+    domStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("code-class"), QIcon(QLatin1String("/usr/share/icons/gnome/32x32/actions/gtk-unindent-ltr.png"))));
+    findCaseSensitiveActionPointer->setIcon(QIcon::fromTheme(QLatin1String("format-text-lowercase"), QIcon::fromTheme(QLatin1String("/usr/share/icons/gnome/32x32/apps/fonts.png"))));
     hideFindTextActionPointer->setIcon(QIcon::fromTheme(QLatin1String("window-close-symbolic")));
 
     // Create the key sequences.
@@ -788,9 +794,24 @@ void BrowserWindow::showSettingsDialog()
     // Instantiate a settings config dialog from the settings.kcfg file.
     configDialogPointer = new KConfigDialog(this, QLatin1String("settings"), kConfigSkeletonPointer);
 
+    // Create a settings icon string.
+    QString settingsIconString;
+
+    // Get a settings icon that matches the theme.
+    if (QIcon::hasThemeIcon("breeze-settings"))
+    {
+        // KDE uses breeze-settings.
+        settingsIconString = QLatin1String("breeze-settings");
+    }
+    else
+    {
+        // Gnome uses preferences-desktop.
+        settingsIconString = QLatin1String("preferences-desktop");
+    }
+
     // Add the settings widgets as config dialog pages.
-    configDialogPointer->addPage(privacySettingsWidgetPointer, i18nc("Settings tab title", "Privacy"), QLatin1String("privacy-browser"));
-    configDialogPointer->addPage(generalSettingsWidgetPointer, i18nc("Settings tab title", "General"), QLatin1String("breeze-settings"));
+    configDialogPointer->addPage(privacySettingsWidgetPointer, i18nc("Settings tab title", "Privacy"), QLatin1String("privacybrowser"));
+    configDialogPointer->addPage(generalSettingsWidgetPointer, i18nc("Settings tab title", "General"), settingsIconString);
     configDialogPointer->addPage(spellCheckSettingsWidgetPointer, i18nc("Settings tab title", "Spell Check"), QLatin1String("tools-check-spelling"));
 
     // Get handles for the buttons.
@@ -1006,9 +1027,9 @@ void BrowserWindow::updateJavaScriptAction(const bool &isEnabled)
 
     // Set the icon according to the status.
     if (javaScriptEnabled)
-        javaScriptActionPointer->setIcon(QIcon(QStringLiteral(":/icons/javascript-warning")));
+        javaScriptActionPointer->setIcon(QIcon(QLatin1String(":/icons/javascript-warning.svg")));
     else
-        javaScriptActionPointer->setIcon(QIcon(QStringLiteral(":/icons/privacy-mode")));
+        javaScriptActionPointer->setIcon(QIcon(QLatin1String(":/icons/privacy-mode.svg")));
 
     // Set the action checked status.
     javaScriptActionPointer->setChecked(javaScriptEnabled);
@@ -1022,11 +1043,11 @@ void BrowserWindow::updateLocalStorageAction(const bool &isEnabled)
     // Update the local storage status.
     localStorageEnabled = isEnabled;
 
-    // Update the icon.
+    // Update the icon.  On Gnome, the toolbar icons don't pick up unless the size is explicit, probably because the toolbar ends up being an intermediate size.
     if (localStorageEnabled)
-        localStorageActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("disk-quota-high")));
+        localStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("disk-quota-high"), QIcon(QLatin1String("/usr/share/icons/gnome/32x32/actions/filesaveas.png"))));
     else
-        localStorageActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("disk-quota")));
+        localStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("disk-quota"), QIcon(QLatin1String("/usr/share/icons/gnome/32x32/apps/kfm.png"))));
 
     // Set the action checked status.
     localStorageActionPointer->setChecked(localStorageEnabled);
@@ -1045,6 +1066,9 @@ void BrowserWindow::updateSearchEngineActions(const QString &searchEngine, const
         // Check the Mojeek user agent action.
         searchEngineMojeekActionPointer->setChecked(true);
 
+        // Update the search engine menu action icon.
+        searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+
         // Update the search engine menu action text.
         searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Mojeek"));
     }
@@ -1053,6 +1077,9 @@ void BrowserWindow::updateSearchEngineActions(const QString &searchEngine, const
         // Check the Monocles user agent action.
         searchEngineMonoclesActionPointer->setChecked(true);
 
+        // Update the search engine menu action icon.
+        searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+
         // Update the search engine menu action text.
         searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Monocles"));
     }
@@ -1061,6 +1088,9 @@ void BrowserWindow::updateSearchEngineActions(const QString &searchEngine, const
         // Check the MetaGer user agent action.
         searchEngineMetagerActionPointer->setChecked(true);
 
+        // Update the search engine menu action icon.
+        searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+
         // Update the search engine menu action text.
         searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - MetaGer"));
     }
@@ -1069,6 +1099,9 @@ void BrowserWindow::updateSearchEngineActions(const QString &searchEngine, const
         // Check the Google user agent action.
         searchEngineGoogleActionPointer->setChecked(true);
 
+        // Update the search engine menu action icon.
+        searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-google"), QIcon::fromTheme(QLatin1String("edit-find"))));
+
         // Update the search engine menu action text.
         searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Google"));
     }
@@ -1077,6 +1110,9 @@ void BrowserWindow::updateSearchEngineActions(const QString &searchEngine, const
         // Check the Bing user agent action.
         searchEngineBingActionPointer->setChecked(true);
 
+        // Update the search engine menu action icon.
+        searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+
         // Update the search engine menu action text.
         searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Bing"));
     }
@@ -1085,6 +1121,9 @@ void BrowserWindow::updateSearchEngineActions(const QString &searchEngine, const
         // Check the Yahoo user agent action.
         searchEngineYahooActionPointer->setChecked(true);
 
+        // Update the search engine menu action icon.
+        searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-yahoo"), QIcon::fromTheme(QLatin1String("edit-find"))));
+
         // Update the search engine menu action text.
         searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Yahoo"));
     }
@@ -1093,6 +1132,9 @@ void BrowserWindow::updateSearchEngineActions(const QString &searchEngine, const
         // Check the user agent.
         searchEngineCustomActionPointer->setChecked(true);
 
+        // Update the search engine menu action icon.
+        searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+
         // Update the search engine menu action text.
         searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Custom"));
 
@@ -1134,6 +1176,9 @@ void BrowserWindow::updateUserAgentActions(const QString &userAgent, const bool
         // Check the Privacy Browser user agent action.
         userAgentPrivacyBrowserActionPointer->setChecked(true);
 
+        // Update the user agent menu action icon.
+        userAgentMenuActionPointer->setIcon(QIcon(":/icons/privacy-mode.svg"));
+
         // Update the user agent menu action text.
         userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Privacy Browser"));
     }
@@ -1142,6 +1187,9 @@ void BrowserWindow::updateUserAgentActions(const QString &userAgent, const bool
         // check the WebEngine default user agent action.
         userAgentWebEngineDefaultActionPointer->setChecked(true);
 
+        // Update the user agent menu action icon.
+        userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("qtlogo"), QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new")))));
+
         // Update the user agent menu action text.
         userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - WebEngine default"));
     }
@@ -1150,6 +1198,9 @@ void BrowserWindow::updateUserAgentActions(const QString &userAgent, const bool
         // Check the Firefox on Linux user agent action.
         userAgentFirefoxLinuxActionPointer->setChecked(true);
 
+        // Update the user agent menu action icon.
+        userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr"), QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new")))));
+
         // Update the user agent menu action text.
         userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Firefox on Linux"));
     }
@@ -1158,6 +1209,9 @@ void BrowserWindow::updateUserAgentActions(const QString &userAgent, const bool
         // Check the Chromium on Linux user agent action.
         userAgentChromiumLinuxActionPointer->setChecked(true);
 
+        // Update the user agent menu action icon.
+        userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium"), QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new")))));
+
         // Update the user agent menu action text.
         userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Chromium on Linux"));
     }
@@ -1166,6 +1220,9 @@ void BrowserWindow::updateUserAgentActions(const QString &userAgent, const bool
         // Check the Firefox on Windows user agent action.
         userAgentFirefoxWindowsActionPointer->setChecked(true);
 
+        // Update the user agent menu action icon.
+        userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr"), QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new")))));
+
         // Update the user agent menu action text.
         userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Firefox on Windows"));
     }
@@ -1174,6 +1231,9 @@ void BrowserWindow::updateUserAgentActions(const QString &userAgent, const bool
         // Check the Chrome on Windows user agent action.
         userAgentChromeWindowsActionPointer->setChecked(true);
 
+        // Update the user agent menu action icon.
+        userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium"), QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new")))));
+
         // Update the user agent menu action text.
         userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Chrome on Windows"));
     }
@@ -1182,6 +1242,9 @@ void BrowserWindow::updateUserAgentActions(const QString &userAgent, const bool
         // Check the Edge on Windows user agent action.
         userAgentEdgeWindowsActionPointer->setChecked(true);
 
+        // Update the user agent menu action icon.
+        userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+
         // Update the user agent menu action text.
         userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Edge on Windows"));
     }
@@ -1190,6 +1253,9 @@ void BrowserWindow::updateUserAgentActions(const QString &userAgent, const bool
         // Check the Safari on macOS user agent action.
         userAgentSafariMacosActionPointer->setChecked(true);
 
+        // Update the user agent menu action icon.
+        userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+
         // Update the user agent menu action text.
         userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Safari on macOS"));
     }
@@ -1198,6 +1264,9 @@ void BrowserWindow::updateUserAgentActions(const QString &userAgent, const bool
         // Check the user agent.
         userAgentCustomActionPointer->setChecked(true);
 
+        // Update the user agent menu action icon.
+        userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+
         // Update the user agent menu action text.
         userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Custom"));