ukui-media/0010-repair-the-problem-of-adjusting-animation-freeze.patch

91 lines
3.9 KiB
Diff

From 15c52befc8e1e1baaef19bb7a7f0e77621066708 Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Mon, 27 Sep 2021 15:37:28 +0800
Subject: [PATCH] repair the problem of adjusting animation freeze
---
.../ukmedia_device_switch_widget.cpp | 20 +++++++++----------
.../ukmedia_device_switch_widget.h | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/ukui-volume-control-applet-qt/ukmedia_device_switch_widget.cpp b/ukui-volume-control-applet-qt/ukmedia_device_switch_widget.cpp
index 8307fc1..bafb4cc 100755
--- a/ukui-volume-control-applet-qt/ukmedia_device_switch_widget.cpp
+++ b/ukui-volume-control-applet-qt/ukmedia_device_switch_widget.cpp
@@ -411,13 +411,13 @@ DeviceSwitchWidget::DeviceSwitchWidget(QWidget *parent) : QWidget (parent)
* \details
* 完整模式下,应用音量节面,当滑动条值改变时更改系统音量
*/
- // connect(appWidget->systemVolumeSlider,SIGNAL(valueChanged(int)),this,SLOT( advancedSystemSliderChangedSlot(int)));
+ connect(appWidget->systemVolumeSlider,SIGNAL(valueChanged(int)),this,SLOT( advancedSystemSliderChangedSlot(int)));
/*!
* \brief
* \details
* 完整模式下,系统音量界面,当滑动条值改变时更改系统音量
*/
- // connect(devWidget->outputDeviceSlider,SIGNAL(valueChanged(int)),this,SLOT(outputDeviceSliderChangedSlot(int)));
+ connect(devWidget->outputDeviceSlider,SIGNAL(valueChanged(int)),this,SLOT(outputDeviceSliderChangedSlot(int)));
/*!
* \brief
* \details
@@ -2485,7 +2485,7 @@ void DeviceSwitchWidget::update_icon_input (DeviceSwitchWidget *w,MateMixerStrea
* control for the icon */
control = input;
}
- //show = true;
+ show = TRUE;
break;
}
@@ -2552,7 +2552,7 @@ void DeviceSwitchWidget::update_icon_output (DeviceSwitchWidget *w,MateMixerCont
QSlider *slider1 = w->miniWidget->findChild<QSlider *>(w->outputControlName);
if (slider1 == nullptr)
return;
- w->setVolume = true;
+// w->setVolume = true;
w->devWidget->outputDeviceSlider->setValue(value);
// w->miniWidget->masterVolumeSlider->setValue(value);
w->appWidget->systemVolumeSlider->setValue(value);
@@ -2789,11 +2789,11 @@ void DeviceSwitchWidget::on_control_mute_notify (MateMixerStreamControl *control
void DeviceSwitchWidget::on_stream_control_volume_notify (MateMixerStreamControl *control,GParamSpec *pspec,DeviceSwitchWidget *w)
{
Q_UNUSED(pspec);
- if (w->setVolume == true) {
- w->setVolume = false;
- qDebug() << "123123123123123";
- return;
- }
+// if (w->setVolume == true) {
+// w->setVolume = false;
+// qDebug() << "123123123123123";
+// return;
+// }
MateMixerStreamControlFlags flags;
gboolean muted = FALSE;
gdouble decibel = 0.0;
@@ -2842,7 +2842,7 @@ void DeviceSwitchWidget::on_stream_control_volume_notify (MateMixerStreamControl
ca_context_create(&context);
int value = int(volume*100/65536.0 + 0.5);
if (direction == MATE_MIXER_DIRECTION_OUTPUT) {
- w->setVolume = true;
+// w->setVolume = true;
w->devWidget->outputDeviceSlider->setValue(value);
w->appWidget->systemVolumeSlider->setValue(value);
w->miniWidget->masterVolumeSlider->setValue(value);
diff --git a/ukui-volume-control-applet-qt/ukmedia_device_switch_widget.h b/ukui-volume-control-applet-qt/ukmedia_device_switch_widget.h
index 2c9b778..5230000 100755
--- a/ukui-volume-control-applet-qt/ukmedia_device_switch_widget.h
+++ b/ukui-volume-control-applet-qt/ukmedia_device_switch_widget.h
@@ -269,7 +269,7 @@ private:
bool firstEnterSystem = true;
ca_context *caContext;
- bool setVolume = false;
+// bool setVolume = false;
bool setOutputVolume = false;
bool setInputVolume = false;
--
2.30.0