Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 23, 2025

PR Checklist

  • Functionality has been tested, no obvious bugs
  • Code style follows project conventions
  • Documentation/comments updated (if applicable)

Brief Description of Changes

Volume adjustment via mouse wheel was accumulating values beyond the valid [0.0, 1.0] range. The slider UI would appear stuck at min/max while the internal value continued to change, requiring equivalent reverse scrolling to restore responsiveness.

Changes:

  • Clamped volume delta in ChangeVolume() to prevent overflow
  • Added defensive clamping when loading persisted volume settings
private void ChangeVolume(double delta)
{
    // Before: LinearVolume += delta;
    LinearVolume = Math.Max(0.0, Math.Min(1.0, LinearVolume + delta));
}

Related Issue (if any)

Fixes volume scroll issue described in the original issue report where continuous scrolling made the control unresponsive.

Additional Notes

Used Math.Max/Math.Min for .NET Framework 4.6.2 compatibility instead of Math.Clamp.

Original prompt

This section details on the original issue you should resolve

<issue_title>Mouse scroll volume adjustment</issue_title>
<issue_description>When you adjust the volume of a video with a scroll wheel, the cursor can go beyond the limits even though it doesn't show visually. If you keep scrolling it will just continue to go forward and then you have to scroll the same amount to be able to get it back. It's kind of hard to explain so I'll attach a video that showcases the issue. I never stop scrolling with my mouse even though it looks like it in the video.

To reproduce: Just adjust the volume with mouse scroll wheel

Expected behavior: The volume adjustment knob shouldn't be able to go beyond the limits of the volume adjuster.

os version: Windows 11 24H2
QuickLook version : 4.2.2 standalone exe installer but it's been happening for a few releases now. It's also been reported before, I think.

https://github.com/user-attachments/assets/79cb5972-bbb1-47d5-a7fd-87329536174b
</issue_description>

Comments on the Issue (you are @copilot in this section)

@emako That's true. I didn't even notice it. You were the first to report this issue.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…0.0, 1.0]

Co-authored-by: emako <24737061+emako@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix mouse scroll volume adjustment limits Fix volume control exceeding limits during mouse wheel scroll Nov 23, 2025
Copilot AI requested a review from emako November 23, 2025 17:00
Replaced double literals from 0.0/1.0 to 0d/1d for consistency and clarity. Also updated rotation handling to use double literals and improved code readability.
@emako emako marked this pull request as ready for review November 24, 2025 16:18
@emako emako merged commit cbf3e56 into master Nov 24, 2025
1 check 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.

Mouse scroll volume adjustment

2 participants