Use correct signal naming

This commit is contained in:
Veronica Berglyd Olsen
2024-12-29 17:38:03 +01:00
parent dc9413fa7e
commit 2fa1dcccac
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -201,10 +201,10 @@ class NIconToggleButton(QToolButton):
class NClickableLabel(QLabel):
mouseClick = pyqtSignal()
mouseClicked = pyqtSignal()
def mousePressEvent(self, event: QMouseEvent) -> None:
"""Capture a left mouse click and emit its signal."""
if event.button() == QtMouseLeft:
self.mouseClick.emit()
self.mouseClicked.emit()
return super().mousePressEvent(event)
+2 -2
View File
@@ -94,7 +94,7 @@ class GuiMainStatus(QStatusBar):
# The Session Clock
# Set the minimum width so the label doesn't rescale every second
self.timeIcon = NClickableLabel(self)
self.timeIcon.mouseClick.connect(self._onClickTimerLabel)
self.timeIcon.mouseClicked.connect(self._onClickTimerLabel)
self.timeText = NClickableLabel("", self)
self.timeText.setToolTip(self.tr("Session Time"))
@@ -102,7 +102,7 @@ class GuiMainStatus(QStatusBar):
self.timeIcon.setContentsMargins(0, 0, 0, 0)
self.timeText.setContentsMargins(0, 0, 0, 0)
self.timeText.setVisible(CONFIG.showSessionTime)
self.timeText.mouseClick.connect(self._onClickTimerLabel)
self.timeText.mouseClicked.connect(self._onClickTimerLabel)
self.addPermanentWidget(self.timeIcon)
self.addPermanentWidget(self.timeText)