From 423ef43eb3e94097194c9b266c83df6e8cda6a0e Mon Sep 17 00:00:00 2001 From: gounux Date: Mon, 15 Apr 2024 17:03:58 +0200 Subject: [PATCH] Edit icons --- qtribu/gui/dlg_contents.py | 16 ++++++++++++++++ qtribu/gui/dlg_contents.ui | 9 +++++++++ qtribu/plugin_main.py | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/qtribu/gui/dlg_contents.py b/qtribu/gui/dlg_contents.py index 45b66621..d79bc2fb 100644 --- a/qtribu/gui/dlg_contents.py +++ b/qtribu/gui/dlg_contents.py @@ -2,6 +2,7 @@ from pathlib import Path from typing import Callable, Dict, List +from qgis.core import QgsApplication from qgis.PyQt import QtCore, QtWidgets, uic from qgis.PyQt.QtGui import QIcon from qgis.PyQt.QtWidgets import QDialog, QTreeWidgetItem, QWidget @@ -30,15 +31,30 @@ def __init__(self, parent: QWidget = None): self.json_feed_client = JsonFeedClient() self.web_viewer = WebViewer() uic.loadUi(Path(__file__).parent / f"{Path(__file__).stem}.ui", self) + self.setWindowIcon( + QIcon(str(DIR_PLUGIN_ROOT / "resources/images/logo_green_no_text.svg")) + ) # buttons actions self.form_rdp_news = None self.submit_article_button.clicked.connect(self.submit_article) + self.submit_article_button.setIcon( + QgsApplication.getThemeIcon("mActionEditTable.svg") + ) self.submit_news_button.clicked.connect(self.submit_news) + self.submit_news_button.setIcon( + QgsApplication.getThemeIcon("mActionAllEdits.svg") + ) self.donate_button.clicked.connect(self.donate) + self.donate_button.setIcon( + QgsApplication.getThemeIcon("mActionAddAllToOverview.svg") + ) self.refresh_list_button.clicked.connect( partial(self.refresh_list, lambda: self.search_line_edit.text()) ) + self.refresh_list_button.setIcon( + QgsApplication.getThemeIcon("mActionHistory.svg") + ) # search actions self.search_line_edit.textChanged.connect(self.on_search_text_changed) diff --git a/qtribu/gui/dlg_contents.ui b/qtribu/gui/dlg_contents.ui index dcb26a43..e987eb73 100644 --- a/qtribu/gui/dlg_contents.ui +++ b/qtribu/gui/dlg_contents.ui @@ -183,6 +183,12 @@ + + true + + + true + 4 @@ -192,6 +198,9 @@ true + + 64 + true diff --git a/qtribu/plugin_main.py b/qtribu/plugin_main.py index e415a1c2..db9af321 100644 --- a/qtribu/plugin_main.py +++ b/qtribu/plugin_main.py @@ -92,7 +92,7 @@ def initGui(self): self.action_run.triggered.connect(self.run) self.action_contents = QAction( - QIcon(str(DIR_PLUGIN_ROOT / "resources/images/logo_orange_no_text.svg")), + QgsApplication.getThemeIcon("mActionConditionalFormatting.svg"), self.tr("Contents"), self.iface.mainWindow(), )