mirror of
https://github.com/pyapp-kit/superqt.git
synced 2025-12-15 18:50:05 +01:00
feat: add addKey method to QIconifyIcon (#218)
* feat: addKey method to Iconify * style: [pre-commit.ci] auto fixes [...] * remove breakpoint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import pytest
|
||||
from qtpy.QtGui import QIcon
|
||||
from qtpy.QtWidgets import QPushButton
|
||||
|
||||
from superqt import QIconifyIcon
|
||||
@@ -13,9 +14,8 @@ def test_qiconify(qtbot: "QtBot", monkeypatch: "pytest.MonkeyPatch") -> None:
|
||||
monkeypatch.setenv("PYCONIFY_CACHE", "0")
|
||||
pytest.importorskip("pyconify")
|
||||
|
||||
icon = QIconifyIcon("bi:alarm-fill", color="red", rotate=90)
|
||||
assert icon.path.name.endswith(".svg")
|
||||
assert icon.name() == "bi:alarm-fill"
|
||||
icon = QIconifyIcon("bi:alarm-fill", color="red", flip="vertical")
|
||||
icon.addKey("bi:alarm", color="blue", rotate=90, state=QIcon.State.On)
|
||||
|
||||
btn = QPushButton()
|
||||
qtbot.addWidget(btn)
|
||||
|
||||
Reference in New Issue
Block a user