Skip to content

Commit 6f645d5

Browse files
committed
Minor cosmetic changes
1 parent f86e2ea commit 6f645d5

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/napari_deeplabcut/_widgets.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,18 @@ def __init__(self, parent):
6161
self.setParent(parent)
6262
self.setWindowTitle("Tutorial")
6363
self.setModal(True)
64-
self.setWindowOpacity(0.85)
64+
self.setStyleSheet("background:#cdb4db")
65+
self.setWindowOpacity(0.95)
6566
self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint)
6667

6768
self._current_tip = 0
6869
self._tips = [
69-
Tip('Load a folder of annotated data\n(and optionally a config file if labeling from scratch).\nAlternatively, files and folders of images can be dragged\nand dropped onto the main window.', (0.45, 0.05)),
70-
Tip('Data layers will be listed at the bottom left;\ntheir visibility can be toggled by clicking on the small eye icon.', (0.1, 0.65)),
71-
Tip('Corresponding layer controls can be found at the top left.\nSwitch between labeling and selection mode using the numeric keys 2 and 3,\nor clicking on the + or -> icons.', (0.1, 0.2)),
72-
Tip('There are three keypoint labeling modes:\nthe key M can be used to cycle between them.', (0.65, 0.05)),
73-
Tip('When done labeling, save your data by selecting the Points layer\nand hitting Ctrl+S (or File > Save Selected Layer(s)...).', (0.1, 0.65)),
74-
Tip('''Read more at <a href='https://github.com/DeepLabCut/napari-deeplabcut#usage'>napari-deeplabcut</a>''', (0.4, 0.4)),
70+
Tip("Load a folder of annotated data\n(and optionally a config file if labeling from scratch).\nAlternatively, files and folders of images can be dragged\nand dropped onto the main window.", (0.45, 0.05)),
71+
Tip("Data layers will be listed at the bottom left;\ntheir visibility can be toggled by clicking on the small eye icon.", (0.1, 0.65)),
72+
Tip("Corresponding layer controls can be found at the top left.\nSwitch between labeling and selection mode using the numeric keys 2 and 3,\nor clicking on the + or -> icons.", (0.1, 0.2)),
73+
Tip("There are three keypoint labeling modes:\nthe key M can be used to cycle between them.", (0.65, 0.05)),
74+
Tip("When done labeling, save your data by selecting the Points layer\nand hitting Ctrl+S (or File > Save Selected Layer(s)...).", (0.1, 0.65)),
75+
Tip("Read more at <a href='https://github.com/DeepLabCut/napari-deeplabcut#usage'>napari-deeplabcut</a>", (0.4, 0.4)),
7576
]
7677

7778
buttons = QDialogButtonBox.StandardButton.Ok | QDialogButtonBox.StandardButton.Abort
@@ -80,7 +81,7 @@ def __init__(self, parent):
8081
self.button_box.rejected.connect(self.reject)
8182

8283
vlayout = QVBoxLayout()
83-
self.message = QLabel("Let's get started with a quick walkthrough!")
84+
self.message = QLabel("💡\n\nLet's get started with a quick walkthrough!")
8485
self.message.setTextInteractionFlags(Qt.LinksAccessibleByMouse)
8586
self.message.setOpenExternalLinks(True)
8687
vlayout.addWidget(self.message)
@@ -95,7 +96,10 @@ def accept(self):
9596
if self._current_tip == 0 and "walkthrough" not in self.message.text():
9697
self.reject()
9798
tip = self._tips[self._current_tip]
98-
self.message.setText(tip.msg)
99+
msg = tip.msg
100+
if self._current_tip < 5: # No emoji in the last tip otherwise the hyperlink breaks
101+
msg = "💡\n\n" + msg
102+
self.message.setText(msg)
99103
self.count.setText(f"Tip {self._current_tip + 1}|{len(self._tips)}")
100104
self.adjustSize()
101105
xrel, yrel = tip.pos

0 commit comments

Comments
 (0)