1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-08-01 21:59:36 +08:00

fix(bulletin): 修复状态标签圆圈不可见和定时器悬空引用问题

This commit is contained in:
2026-06-25 11:32:58 +08:00
parent 6f32923865
commit 6a9c662287
3 changed files with 2 additions and 6 deletions
+1 -1
View File
@@ -332,7 +332,7 @@ class ALBulletinDialog(QDialog, Ui_ALBulletinDialog):
self.ALSyncStatusLabel.status = ALStatusLabel.Status.SUCCESS
self.SyncStatusDetailLabel.setText("同步成功")
self.SyncStatusDetailLabel.setStyleSheet("color: green;")
QTimer.singleShot(3000, self.clearSyncStatus)
QTimer.singleShot(3000, self, self.clearSyncStatus)
self.setLastSyncTime(self.__bulletin_mgr.lastSyncTime())
self.updateBulletinList(merged)
+1 -1
View File
@@ -497,7 +497,7 @@ class ALSettingsWidget(CenterOnParentMixin, QWidget, Ui_ALSettingsWidget):
)
self.BulletinTestStatusLabel.setStyleSheet("color: green;")
self.BulletinTestButton.setEnabled(True)
QTimer.singleShot(3000, self.clearBulletinTestStatus)
QTimer.singleShot(3000, self, self.clearBulletinTestStatus)
@Slot(str)
def __onBulletinTestError(
-4
View File
@@ -127,7 +127,6 @@ class ALStatusLabel(QLabel):
case self.Status.WAITING:
Pen = Painter.pen()
Pen.setWidth(2)
Pen.setBrush(Qt.BrushStyle.NoBrush)
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
Pen.setColor(QColor("#969696")) # grey
Painter.setPen(Pen)
@@ -156,7 +155,6 @@ class ALStatusLabel(QLabel):
# draw the success green circle
Pen = Painter.pen()
Pen.setWidth(2)
Pen.setBrush(Qt.BrushStyle.NoBrush)
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
Pen.setColor(QColor("#4CAF50" if self.isDarkMode() else "#00AF50")) # green
Painter.setPen(Pen)
@@ -193,7 +191,6 @@ class ALStatusLabel(QLabel):
# draw the warning orange circle
Pen = Painter.pen()
Pen.setWidth(2)
Pen.setBrush(Qt.BrushStyle.NoBrush)
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
Pen.setColor(QColor("#FF9800")) # orange
Painter.setPen(Pen)
@@ -223,7 +220,6 @@ class ALStatusLabel(QLabel):
# draw the failure red circle
Pen = Painter.pen()
Pen.setWidth(2)
Pen.setBrush(Qt.BrushStyle.NoBrush)
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
Pen.setColor(QColor("#DC0000")) # red
Painter.setPen(Pen)