mirror of
https://github.com/KenanZhu/AutoLibrary.git
synced 2026-08-03 06:29:35 +08:00
fix(bulletin): 修复状态标签圆圈不可见和定时器悬空引用问题
This commit is contained in:
@@ -332,7 +332,7 @@ class ALBulletinDialog(QDialog, Ui_ALBulletinDialog):
|
|||||||
self.ALSyncStatusLabel.status = ALStatusLabel.Status.SUCCESS
|
self.ALSyncStatusLabel.status = ALStatusLabel.Status.SUCCESS
|
||||||
self.SyncStatusDetailLabel.setText("同步成功")
|
self.SyncStatusDetailLabel.setText("同步成功")
|
||||||
self.SyncStatusDetailLabel.setStyleSheet("color: green;")
|
self.SyncStatusDetailLabel.setStyleSheet("color: green;")
|
||||||
QTimer.singleShot(3000, self.clearSyncStatus)
|
QTimer.singleShot(3000, self, self.clearSyncStatus)
|
||||||
|
|
||||||
self.setLastSyncTime(self.__bulletin_mgr.lastSyncTime())
|
self.setLastSyncTime(self.__bulletin_mgr.lastSyncTime())
|
||||||
self.updateBulletinList(merged)
|
self.updateBulletinList(merged)
|
||||||
|
|||||||
@@ -497,7 +497,7 @@ class ALSettingsWidget(CenterOnParentMixin, QWidget, Ui_ALSettingsWidget):
|
|||||||
)
|
)
|
||||||
self.BulletinTestStatusLabel.setStyleSheet("color: green;")
|
self.BulletinTestStatusLabel.setStyleSheet("color: green;")
|
||||||
self.BulletinTestButton.setEnabled(True)
|
self.BulletinTestButton.setEnabled(True)
|
||||||
QTimer.singleShot(3000, self.clearBulletinTestStatus)
|
QTimer.singleShot(3000, self, self.clearBulletinTestStatus)
|
||||||
|
|
||||||
@Slot(str)
|
@Slot(str)
|
||||||
def __onBulletinTestError(
|
def __onBulletinTestError(
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ class ALStatusLabel(QLabel):
|
|||||||
case self.Status.WAITING:
|
case self.Status.WAITING:
|
||||||
Pen = Painter.pen()
|
Pen = Painter.pen()
|
||||||
Pen.setWidth(2)
|
Pen.setWidth(2)
|
||||||
Pen.setBrush(Qt.BrushStyle.NoBrush)
|
|
||||||
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
|
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
|
||||||
Pen.setColor(QColor("#969696")) # grey
|
Pen.setColor(QColor("#969696")) # grey
|
||||||
Painter.setPen(Pen)
|
Painter.setPen(Pen)
|
||||||
@@ -156,7 +155,6 @@ class ALStatusLabel(QLabel):
|
|||||||
# draw the success green circle
|
# draw the success green circle
|
||||||
Pen = Painter.pen()
|
Pen = Painter.pen()
|
||||||
Pen.setWidth(2)
|
Pen.setWidth(2)
|
||||||
Pen.setBrush(Qt.BrushStyle.NoBrush)
|
|
||||||
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
|
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
|
||||||
Pen.setColor(QColor("#4CAF50" if self.isDarkMode() else "#00AF50")) # green
|
Pen.setColor(QColor("#4CAF50" if self.isDarkMode() else "#00AF50")) # green
|
||||||
Painter.setPen(Pen)
|
Painter.setPen(Pen)
|
||||||
@@ -193,7 +191,6 @@ class ALStatusLabel(QLabel):
|
|||||||
# draw the warning orange circle
|
# draw the warning orange circle
|
||||||
Pen = Painter.pen()
|
Pen = Painter.pen()
|
||||||
Pen.setWidth(2)
|
Pen.setWidth(2)
|
||||||
Pen.setBrush(Qt.BrushStyle.NoBrush)
|
|
||||||
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
|
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
|
||||||
Pen.setColor(QColor("#FF9800")) # orange
|
Pen.setColor(QColor("#FF9800")) # orange
|
||||||
Painter.setPen(Pen)
|
Painter.setPen(Pen)
|
||||||
@@ -223,7 +220,6 @@ class ALStatusLabel(QLabel):
|
|||||||
# draw the failure red circle
|
# draw the failure red circle
|
||||||
Pen = Painter.pen()
|
Pen = Painter.pen()
|
||||||
Pen.setWidth(2)
|
Pen.setWidth(2)
|
||||||
Pen.setBrush(Qt.BrushStyle.NoBrush)
|
|
||||||
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
|
Pen.setCapStyle(Qt.PenCapStyle.RoundCap)
|
||||||
Pen.setColor(QColor("#DC0000")) # red
|
Pen.setColor(QColor("#DC0000")) # red
|
||||||
Painter.setPen(Pen)
|
Painter.setPen(Pen)
|
||||||
|
|||||||
Reference in New Issue
Block a user