|
36 | 36 | QWidget,
|
37 | 37 | )
|
38 | 38 |
|
| 39 | +ICON_FOLDER = os.path.join(os.path.dirname(__file__), "assets") |
| 40 | + |
39 | 41 | from napari_deeplabcut import keypoints
|
40 | 42 | from napari_deeplabcut._reader import _load_config
|
41 | 43 | from napari_deeplabcut._writer import _write_config, _write_image, _form_df
|
@@ -594,7 +596,7 @@ def __init__(
|
594 | 596 | for menu in self.menus.values():
|
595 | 597 | layout2.addWidget(menu)
|
596 | 598 | self.lock_button = QPushButton("Lock selection")
|
597 |
| - self.lock_button.setIcon(QIcon('src/napari_deeplabcut/assets/unlock.svg')) |
| 599 | + self.lock_button.setIcon(QIcon(os.path.join(ICON_FOLDER, "unlock.svg"))) |
598 | 600 | self.lock_button.setIconSize(QSize(24, 24))
|
599 | 601 | self.lock_button.clicked.connect(self._lock_current_keypoint)
|
600 | 602 | layout2.addWidget(self.lock_button)
|
@@ -629,10 +631,10 @@ def _lock_current_keypoint(self):
|
629 | 631 | self._locked = not self._locked
|
630 | 632 | if self._locked:
|
631 | 633 | self.lock_button.setText("Unlock selection")
|
632 |
| - self.lock_button.setIcon(QIcon('src/napari_deeplabcut/assets/lock.svg')) |
| 634 | + self.lock_button.setIcon(QIcon(os.path.join(ICON_FOLDER, "lock.svg"))) |
633 | 635 | else:
|
634 | 636 | self.lock_button.setText("Lock selection")
|
635 |
| - self.lock_button.setIcon(QIcon('src/napari_deeplabcut/assets/unlock.svg')) |
| 637 | + self.lock_button.setIcon(QIcon(os.path.join(ICON_FOLDER, "unlock.svg"))) |
636 | 638 |
|
637 | 639 | def update_menus(self, event):
|
638 | 640 | keypoint = self.store.current_keypoint
|
|
0 commit comments