Skip to content

fix: set page step for volume slider#346

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-327497
Aug 7, 2025
Merged

fix: set page step for volume slider#346
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-327497

Conversation

@wjyrich

@wjyrich wjyrich commented Aug 6, 2025

Copy link
Copy Markdown
Contributor
  1. Added setPageStep(2) to volume slider initialization
  2. This ensures consistent volume adjustment increments when using page up/down keys
  3. Previously missing step value could cause inconsistent volume jumps
  4. Matches expected behavior for system volume control

fix: 设置音量滑块的页面步长

  1. 在音量滑块初始化中添加了 setPageStep(2)
  2. 确保在使用页面上下键时音量调整增量为一致值
  3. 之前缺少步长值可能导致音量跳跃不一致
  4. 符合系统音量控制的预期行为

Pms: BUG-327497

Summary by Sourcery

Bug Fixes:

  • Set page step to 2 on volume slider initialization to prevent inconsistent volume jumps when using page navigation keys

1. Added setPageStep(2) to volume slider initialization
2. This ensures consistent volume adjustment increments when using page
up/down keys
3. Previously missing step value could cause inconsistent volume jumps
4. Matches expected behavior for system volume control

fix: 设置音量滑块的页面步长

1. 在音量滑块初始化中添加了 setPageStep(2)
2. 确保在使用页面上下键时音量调整增量为一致值
3. 之前缺少步长值可能导致音量跳跃不一致
4. 符合系统音量控制的预期行为

Pms: BUG-327497
@sourcery-ai

sourcery-ai Bot commented Aug 6, 2025

Copy link
Copy Markdown

Reviewer's Guide

Initialize the volume slider with a fixed page step to ensure consistent volume adjustment increments when using page up/down keys, aligning its behavior with system volume controls.

Class diagram for updated SoundApplet volume slider initialization

classDiagram
    class SoundApplet {
        +void initUi()
    }
    class VolumeSlider {
        +void setMinimum(int)
        +void setMaximum(int)
        +void setPageStep(int)  %% Newly added in initialization
        +Slider* slider()
    }
    SoundApplet --> VolumeSlider : uses
    class SliderContainer {
        +void setSlider(VolumeSlider*)
        +void addBackground()
        +void setButtonsSize(QSize)
    }
    SoundApplet --> SliderContainer : uses
    VolumeSlider --> Slider : composition
Loading

File-Level Changes

Change Details Files
Initialize volume slider with a fixed page step
  • Add m_volumeSlider->setPageStep(2) in initUi()
  • Ensure consistent volume jumps on page up/down
plugins/dde-dock/sound/soundapplet.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @wjyrich - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

关键摘要:

  • 在新增的 m_volumeSlider->setPageStep(2); 行中,setPageStep 的参数设置为2,这可能会影响用户调整音量时的体验,因为每次滑动可能只改变2个单位,而不是通常的1个单位。

是否建议立即修改:

  • 是,建议与产品团队讨论是否需要调整 setPageStep 的值,以确保用户能够更方便地调整音量。如果需要,可以将其设置为1或其他更合适的值。

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, wjyrich

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wjyrich

wjyrich commented Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot deepin-bot Bot merged commit e36bd04 into linuxdeepin:master Aug 7, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants