From 6e93b6fb2c663184202a13bc6804e83f199ec459 Mon Sep 17 00:00:00 2001 From: zhanghongyuan Date: Tue, 13 Aug 2024 09:58:52 +0800 Subject: [PATCH] fix: the recorder taskbar incorrect background-color Log: fix the recorder taskbar incorrect background-color Bug: https://pms.uniontech.com/bug-view-267669.html --- src/dde-dock-plugins/recordtime/timewidget.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/dde-dock-plugins/recordtime/timewidget.cpp b/src/dde-dock-plugins/recordtime/timewidget.cpp index 88909d38..716747cb 100644 --- a/src/dde-dock-plugins/recordtime/timewidget.cpp +++ b/src/dde-dock-plugins/recordtime/timewidget.cpp @@ -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)); } @@ -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); } @@ -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); }