Skip to content

[PowerDisplay] Configurable wheel step + WHEEL_DELTA accumulator on slider extensions#47737

Closed
moooyo wants to merge 6 commits into
mainfrom
yuleng/pd/slider/1
Closed

[PowerDisplay] Configurable wheel step + WHEEL_DELTA accumulator on slider extensions#47737
moooyo wants to merge 6 commits into
mainfrom
yuleng/pd/slider/1

Conversation

@moooyo

@moooyo moooyo commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Layered on top of #47756 (which introduced SliderExtensions + the debounced TwoWay commit pattern for the PowerDisplay flyout sliders). This PR keeps that architecture untouched and adds two enhancements that are specifically valuable for users tuning DDC/CI write granularity or scrolling with high-precision input devices:

PR Checklist

Adds mouse wheel scrolling to the brightness / contrast / volume sliders in the PowerDisplay flyout, mirroring the system volume flyout. A new "Mouse wheel scroll step" setting on the PowerDisplay settings page controls how much each notch moves the value (default 1, options 1 / 2 / 3 / 5 / 10).

#47262

  • Closes: #
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

…e step

Hovering on the brightness/contrast/volume slider and turning the wheel
now moves the value, mirroring the system volume flyout. Each WHEEL_DELTA
(120) accumulates one step so high-precision wheels and touchpads (which
emit fractional deltas) feel notched. Hardware DDC/CI commit is debounced
200ms after the gesture ends, matching the existing drag-release pattern.

Adds a wheel_scroll_step setting (default 1, options 1/2/3/5/10) on the
PowerDisplay settings page. Hot-reloads via SettingsUpdatedPowerDisplayEvent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
#	src/modules/powerdisplay/PowerDisplay/PowerDisplayXAML/MainWindow.xaml
#	src/modules/powerdisplay/PowerDisplay/ViewModels/MonitorViewModel.cs
@github-actions

This comment has been minimized.

- Add comma after "Otherwise" in MonitorViewModel wheel-handler comment
  (line_forbidden.patterns flags ". Otherwise " starting a sentence
  without a following comma).
- Remove stale "DEFAULTTONEAREST" entry from expect.txt; the token is
  already covered by allow/code.txt (Win32 API allowlist), so the
  expect.txt entry is redundant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@moooyo
moooyo marked this pull request as ready for review May 8, 2026 08:51
@niels9001

Copy link
Copy Markdown
Collaborator

FYI, I've added the same functionality to: #47756

Yu Leng and others added 2 commits May 11, 2026 15:21
# Conflicts:
#	src/modules/powerdisplay/PowerDisplay/PowerDisplayXAML/MainWindow.xaml
#	src/modules/powerdisplay/PowerDisplay/ViewModels/MonitorViewModel.cs
Builds on #47756 (SliderExtensions) by adding two enhancements:

1. Bind SliderExtensions.MouseWheelChange to the user-configurable
   WheelScrollStep setting (1/2/3/5/10) instead of the hardcoded 5.
   Forwarded through MonitorViewModel.WheelScrollStep so the binding
   lives in the per-monitor data template, and hot-reloaded by
   listening to MainViewModel.WheelScrollStep on the same channel as
   IsInteractionEnabled.

2. Add a private WheelAccumulator attached property so high-precision
   mice and touchpads (which emit deltas well below WHEEL_DELTA=120)
   feel notched. Without accumulation those sub-notch events would
   either round to zero or write fractional Slider.Value back through
   the int-typed source property, masking the input. Sub-threshold
   events still set e.Handled so the gesture is not delivered to the
   enclosing ScrollViewer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread src/modules/powerdisplay/PowerDisplay/Helpers/SliderExtensions.cs Fixed
@github-actions

This comment has been minimized.

@moooyo moooyo changed the title [PowerDisplay] Mouse wheel scroll on flyout sliders + step setting [PowerDisplay] Configurable wheel step + WHEEL_DELTA accumulator on slider extensions May 11, 2026
", otherwise" → "; otherwise" in SliderExtensions wheel handler comment
(line_forbidden.patterns flags ", [Oo]therwise\b" — should be "; otherwise"
or ". Otherwise"). Same rule that bit our previous spell-check commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@moooyo
moooyo marked this pull request as draft May 11, 2026 08:18
@moooyo moooyo closed this May 15, 2026
@moooyo
moooyo deleted the yuleng/pd/slider/1 branch June 26, 2026 03:17
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