kiran-control-panel/0017-fix-audio-fixed-volume-tray-icon-level-display-not-m.patch
2024-01-18 15:25:01 +08:00

76 lines
3.0 KiB
Diff

From 251cff7db6e926b9df02276acf49d80c8e8b958f Mon Sep 17 00:00:00 2001
From: luoqing <luoqing@kylinsec.com.cn>
Date: Tue, 9 Jan 2024 17:13:10 +0800
Subject: [PATCH 17/17] fix(audio):fixed volume tray icon level display not
meeting requirements
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复音量托盘图标级别显示不符合需求
Close #25235
---
plugins/audio/src/system-tray/audio-system-tray.cpp | 4 ++--
plugins/audio/src/system-tray/volume-setting-page.cpp | 4 ++--
plugins/network/src/signal-forward.cpp | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/plugins/audio/src/system-tray/audio-system-tray.cpp b/plugins/audio/src/system-tray/audio-system-tray.cpp
index ed4412f..b20ad15 100644
--- a/plugins/audio/src/system-tray/audio-system-tray.cpp
+++ b/plugins/audio/src/system-tray/audio-system-tray.cpp
@@ -266,12 +266,12 @@ void AudioSystemTray::setTrayIcon(int value)
icon.addPixmap(trayIconColorSwitch("kcp-audio-mute"));
icon.addPixmap(trayIconColorSwitch("kcp-audio-mute", 64));
}
- else if (0 < value && value <= 33)
+ else if (0 < value && value <= 34)
{
icon.addPixmap(trayIconColorSwitch("kcp-audio-low"));
icon.addPixmap(trayIconColorSwitch("kcp-audio-low", 64));
}
- else if (33 < value && value <= 66)
+ else if (33 < value && value <= 67)
{
icon.addPixmap(trayIconColorSwitch("kcp-audio-medium"));
icon.addPixmap(trayIconColorSwitch("kcp-audio-medium", 64));
diff --git a/plugins/audio/src/system-tray/volume-setting-page.cpp b/plugins/audio/src/system-tray/volume-setting-page.cpp
index dbb1cd8..d95b039 100644
--- a/plugins/audio/src/system-tray/volume-setting-page.cpp
+++ b/plugins/audio/src/system-tray/volume-setting-page.cpp
@@ -239,11 +239,11 @@ void VolumeSettingPage::setVolumeIcon(int value)
{
ui->muteButton->setIcon(trayIconColorSwitch("kcp-audio-mute"));
}
- else if (0 < value && value <= 33)
+ else if (0 < value && value <= 34)
{
ui->muteButton->setIcon(trayIconColorSwitch("kcp-audio-low"));
}
- else if (33 < value && value <= 66)
+ else if (33 < value && value <= 67)
{
ui->muteButton->setIcon(trayIconColorSwitch("kcp-audio-medium"));
}
diff --git a/plugins/network/src/signal-forward.cpp b/plugins/network/src/signal-forward.cpp
index 82f4de9..de8415d 100644
--- a/plugins/network/src/signal-forward.cpp
+++ b/plugins/network/src/signal-forward.cpp
@@ -172,10 +172,10 @@ void SignalForward::addDevice(const QString &uni)
switch (device->type())
{
case Device::Type::Ethernet:
- emit wiredDeviceAdded(uni);;
+ emit wiredDeviceAdded(uni);
break;
case Device::Type::Wifi:
- emit wirelessDeviceAdded(uni);;
+ emit wirelessDeviceAdded(uni);
break;
default:
emit otherDeviceAdded(uni);
--
2.33.0