fix: enable real-time volume adjustment in sound applet - #501
Conversation
1. Remove `setTracking(false)` calls from both SoundApplet and SoundQuickPanel 2. This restores the default tracking behavior that emits value changes during slider drag 3. Previously the tracking disabled prevented the volume from updating smoothly as the user dragged the slider 4. The volume now adjusts in real-time as the slider moves, providing immediate audio feedback Log: Fixed volume slider not responding in real-time during adjustment Influence: 1. Test volume adjustment by dragging the slider in the dock sound applet 2. Verify audio volume changes smoothly while dragging instead of only on release 3. Test the quick panel volume slider for the same real-time behavior 4. Ensure volume updates correctly when using keyboard shortcuts or slider steps 5. Verify no regression in volume slider functionality across different audio devices fix: 修复声音调节不能实时变化的问题 1. 移除 SoundApplet 和 SoundQuickPanel 中的 `setTracking(false)` 调用 2. 恢复默认的跟踪行为,使滑块在拖动过程中持续发出值变化事件 3. 此前禁用跟踪导致音量在拖动过程中无法实时更新 4. 音量现在随滑块移动实时调整,提供即时音频反馈 Log: 修复音量滑块在调节时不能实时响应的问题 Influence: 1. 测试在任务栏声音组件中拖拽音量滑块 2. 验证音量在拖动过程中平滑变化,而不是仅在松开时更新 3. 测试快捷面板音量滑块的实时响应行为 4. 验证使用键盘快捷键或步进调节时音量更新正常 5. 确认在不同音频设备上音量滑块功能无回归 PMS: BUG-375031 Change-Id: I3382aecb30658755616c3c5c470fa759c37ae32d
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR fixes delayed volume updates by removing setTracking(false) from both sound sliders, restoring default continuous value-change events during dragging while leaving slider configuration otherwise unchanged; it also updates copyright year ranges. Sequence diagram for real-time volume slider adjustmentsequenceDiagram
actor User
participant Slider as SoundSlider
participant SoundModel
User->>Slider: Drag slider
Slider-->>SoundModel: valueChanged(value)
SoundModel-->>User: Immediate audio volume feedback
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无需修改,语法正确,逻辑清晰 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 代码变更简洁明了,无需额外修改 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 性能良好,实时音量调节是预期行为 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 无需安全加固 💡 改进建议代码示例// 本次变更已为正确的修复方式,无需额外代码示例
// 移除 setTracking(false) 即可恢复滑块实时跟踪行为
// soundapplet.cpp - initUi() 中已移除:
// m_volumeSlider->slider()->setTracking(false);
// soundquickpanel.cpp - initUi() 中已移除:
// m_sliderContainer->slider()->setTracking(false);
//
// Qt滑块默认 tracking=true,移除 setTracking(false) 后
// valueChanged 信号将在拖动过程中持续发射,实现实时音量调节本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fly602, xionglinlin The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
目的
将 master 分支的最新提交 cherry-pick 到 release/2500 分支。
变更
fix: enable real-time volume adjustment in sound applet
setTracking(false)calls from both SoundApplet andSoundQuickPanel
during slider drag
smoothly as the user dragged the slider
immediate audio feedback
Log: Fixed volume slider not responding in real-time during adjustment
Influence:
applet
on release
slider steps
audio devices
fix: 修复声音调节不能实时变化的问题
setTracking(false)调用Log: 修复音量滑块在调节时不能实时响应的问题
Influence:
PMS: BUG-375031
Change-Id: I3382aecb30658755616c3c5c470fa759c37ae32d
涉及文件
Summary by Sourcery
Enable immediate audio volume adjustment across the dock sound applet and quick panel.
Bug Fixes:
Chores: