1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-12 03:37:56 +01:00

refactor: moved to dynamically loaded material design icons

This commit is contained in:
2024-08-21 18:16:08 +02:00
committed by wyzula_j
parent 2bf5c7096e
commit 1d2afaa09e
23 changed files with 115 additions and 68 deletions

View File

@@ -2,8 +2,9 @@
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import os
from bec_qthemes import material_icon
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
from qtpy.QtGui import QIcon
from qtpy.QtGui import QGuiApplication, QIcon
import bec_widgets
from bec_widgets.examples.plugin_example_pyside.tictactoe import TicTacToe
@@ -46,8 +47,9 @@ class TicTacToePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
return "Games"
def icon(self):
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "games.png")
return QIcon(icon_path)
palette = QGuiApplication.palette()
pixmap = material_icon("sports_esports", color=palette.text().color(), filled=True)
return QIcon(pixmap)
def includeFile(self):
return "tictactoe"