Skip to content

Commit

Permalink
fix: the recorder taskbar incorrect background-color
Browse files Browse the repository at this point in the history
Log: fix the recorder taskbar incorrect background-color
Bug: https://pms.uniontech.com/bug-view-267669.html
  • Loading branch information
add-uos authored and max-lvs committed Aug 13, 2024
1 parent 133642a commit 6e93b6f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/dde-dock-plugins/recordtime/timewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void TimeWidget::onTimeout()

void TimeWidget::updateIcon() {
if (Dock::Position::Top == m_position || Dock::Position::Bottom == m_position) {
m_pixmap = QIcon::fromTheme(QString("recordertime"), *m_currentIcon).pixmap(QSize(RECORDER_TIME_LEVEL_ICON_SIZE, RECORDER_TIME_LEVEL_ICON_SIZE));
m_pixmap = QIcon::fromTheme(QString("recordertime"), *m_currentIcon).pixmap(QSize(RECORDER_TIME_VERTICAL_ICON_SIZE, RECORDER_TIME_VERTICAL_ICON_SIZE));
} else {
m_pixmap = QIcon::fromTheme(QString("recordertime"), *m_currentIcon).pixmap(QSize(RECORDER_TIME_VERTICAL_ICON_SIZE, RECORDER_TIME_VERTICAL_ICON_SIZE));
}
Expand Down Expand Up @@ -153,8 +153,7 @@ void TimeWidget::paintEvent(QPaintEvent *e)
QColor color;
if (DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::LightType) {
color = Qt::black;
painter.setOpacity(0.5);

painter.setOpacity(0);
if (m_hover) {
painter.setOpacity(0.6);
}
Expand All @@ -164,8 +163,7 @@ void TimeWidget::paintEvent(QPaintEvent *e)
}
} else {
color = Qt::white;
painter.setOpacity(0.1);

painter.setOpacity(0);
if (m_hover) {
painter.setOpacity(0.2);
}
Expand Down

0 comments on commit 6e93b6f

Please sign in to comment.