mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-05-07 15:24:20 +02:00
refactor: moved to dynamically loaded material design icons
This commit is contained in:
@@ -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.widgets.bec_queue.bec_queue import BECQueue
|
||||
@@ -34,8 +35,9 @@ class BECQueuePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
return "BEC Services"
|
||||
|
||||
def icon(self):
|
||||
icon_path = os.path.join(MODULE_PATH, "assets", "designer_icons", "device_line_edit.png")
|
||||
return QIcon(icon_path)
|
||||
palette = QGuiApplication.palette()
|
||||
pixmap = material_icon("edit_note", color=palette.text().color(), filled=True)
|
||||
return QIcon(pixmap)
|
||||
|
||||
def includeFile(self):
|
||||
return "bec_queue"
|
||||
|
||||
Reference in New Issue
Block a user