!16 the problem of adjusting animation freeze when sliding to adjust the sound
From: @tanyulong2021 Reviewed-by: @dou33 Signed-off-by: @dou33
This commit is contained in:
commit
42ce0d13f5
75
0005-Solve-the-problem-of-adjusting-animation-freeze.patch
Normal file
75
0005-Solve-the-problem-of-adjusting-animation-freeze.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
From cee36cfdcea26d4eced49bfab0af311687393720 Mon Sep 17 00:00:00 2001
|
||||||
|
From: tanyulong <tanyulong@kylinos.cn>
|
||||||
|
Date: Mon, 12 Jul 2021 14:59:03 +0800
|
||||||
|
Subject: [PATCH] Solve the problem of adjusting animation freeze
|
||||||
|
|
||||||
|
---
|
||||||
|
.../ukmedia_device_switch_widget.cpp | 11 +++++++++--
|
||||||
|
.../ukmedia_device_switch_widget.h | 3 ++-
|
||||||
|
2 files changed, 11 insertions(+), 3 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 cb10ae2..3a262a3 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
|
||||||
|
@@ -2507,6 +2507,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->devWidget->outputDeviceSlider->setValue(value);
|
||||||
|
// w->miniWidget->masterVolumeSlider->setValue(value);
|
||||||
|
w->appWidget->systemVolumeSlider->setValue(value);
|
||||||
|
@@ -2734,6 +2735,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;
|
||||||
|
+ }
|
||||||
|
MateMixerStreamControlFlags flags;
|
||||||
|
gboolean muted = FALSE;
|
||||||
|
gdouble decibel = 0.0;
|
||||||
|
@@ -2782,6 +2788,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->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 5881b47..2c9b778 100755
|
||||||
|
--- a/ukui-volume-control-applet-qt/ukmedia_device_switch_widget.h
|
||||||
|
+++ b/ukui-volume-control-applet-qt/ukmedia_device_switch_widget.h
|
||||||
|
@@ -268,7 +268,8 @@ private:
|
||||||
|
QString mThemeName;
|
||||||
|
bool firstEnterSystem = true;
|
||||||
|
ca_context *caContext;
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+ bool setVolume = false;
|
||||||
|
bool setOutputVolume = false;
|
||||||
|
bool setInputVolume = false;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: ukui-media
|
Name: ukui-media
|
||||||
Version: 3.0.2
|
Version: 3.0.2
|
||||||
Release: 5
|
Release: 6
|
||||||
Summary: UKUI media utilities
|
Summary: UKUI media utilities
|
||||||
License: GPL-2+ GPL-3+ LGPL-2+ BSD-3-Clause
|
License: GPL-2+ GPL-3+ LGPL-2+ BSD-3-Clause
|
||||||
URL: http://www.ukui.org
|
URL: http://www.ukui.org
|
||||||
@ -36,6 +36,7 @@ patch0: 0001-fix-vol-icon-bug.patch
|
|||||||
patch1: 0002-Fix-the-right-menu-without-frosted-glass-issue.patch
|
patch1: 0002-Fix-the-right-menu-without-frosted-glass-issue.patch
|
||||||
patch2: 0003-Add-a-detection-mechanism-when-PulseAudio-exits-abno.patch
|
patch2: 0003-Add-a-detection-mechanism-when-PulseAudio-exits-abno.patch
|
||||||
patch3: 0004-update-gsetting.patch
|
patch3: 0004-update-gsetting.patch
|
||||||
|
patch4: 0005-Solve-the-problem-of-adjusting-animation-freeze.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A simple and lightweight screensaver written by Qt5.
|
A simple and lightweight screensaver written by Qt5.
|
||||||
@ -57,7 +58,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
%build
|
%build
|
||||||
./autogen.sh --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64
|
./autogen.sh --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64
|
||||||
make
|
make
|
||||||
@ -118,6 +119,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas/
|
|||||||
%{_datadir}/glib-2.0/
|
%{_datadir}/glib-2.0/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 12 2021 tanyulong<tanyulong@kylinos.cn> - 3.0.2-6
|
||||||
|
- Solve the problem of adjusting animation freeze to adjust the sound
|
||||||
|
|
||||||
* Fri Jul 9 2021 tanyulong<tanyulong@kylinos.cn> - 3.0.2-5
|
* Fri Jul 9 2021 tanyulong<tanyulong@kylinos.cn> - 3.0.2-5
|
||||||
- update gsetting add org.ukui.sound.gschema.xml
|
- update gsetting add org.ukui.sound.gschema.xml
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user