Skip to content

Commit

Permalink
Edit icons
Browse files Browse the repository at this point in the history
  • Loading branch information
gounux committed Apr 15, 2024
1 parent ced5979 commit 423ef43
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
16 changes: 16 additions & 0 deletions qtribu/gui/dlg_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions qtribu/gui/dlg_contents.ui
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@
</item>
<item>
<widget class="QTreeWidget" name="contents_tree_widget">
<property name="itemsExpandable">
<bool>true</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<property name="columnCount">
<number>4</number>
</property>
Expand All @@ -192,6 +198,9 @@
<attribute name="headerCascadingSectionResizes">
<bool>true</bool>
</attribute>
<attribute name="headerMinimumSectionSize">
<number>64</number>
</attribute>
<attribute name="headerShowSortIndicator" stdset="0">
<bool>true</bool>
</attribute>
Expand Down
2 changes: 1 addition & 1 deletion qtribu/plugin_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)
Expand Down

0 comments on commit 423ef43

Please sign in to comment.