Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions deeplabcut/gui/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from urllib.error import URLError
import warnings
import qdarkstyle
from importlib.resources import files

import deeplabcut
from deeplabcut import auxiliaryfunctions, VERSION, compat
Expand Down Expand Up @@ -517,10 +518,12 @@ def create_toolbar(self):
engine_icon.setStyleSheet("background: transparent;")

def _update_icon(engine: str):
pixmap = QPixmap(f"deeplabcut/gui/media/dlc-{engine}.png")
engine_icon.setPixmap(
pixmap.scaled(56, 56, Qt.AspectRatioMode.KeepAspectRatio)
)
file = files("deeplabcut.gui.media") / f"dlc-{engine}.png"
pixmap = QPixmap(str(file))
if not pixmap.isNull():
engine_icon.setPixmap(
pixmap.scaled(56, 56, Qt.AspectRatioMode.KeepAspectRatio)
)

_update_icon("pt" if self.engine == Engine.PYTORCH else "tf")

Expand Down