feat: optional mouse-wheel value adjustment, off by default (closes #3)#6
Open
Miint-Sunny wants to merge 1 commit into
Open
feat: optional mouse-wheel value adjustment, off by default (closes #3)#6Miint-Sunny wants to merge 1 commit into
Miint-Sunny wants to merge 1 commit into
Conversation
Scrolling a list with the pointer over a spinbox/slider/combo silently bumped its value (upstream issue 1756141021#3, no undo either). Add an app-wide wheel guard: when the new settings toggle (off by default, as requested) is disabled, the wheel is swallowed before the control sees it and the delta is applied straight to the nearest scroll area's scrollbar — the list scrolls, the value stays put. Direct scrollbar driving (not synthetic event forwarding) keeps macOS trackpad pixel deltas smooth and avoids phase-tracking breakage; combo popup lists still scroll natively. The per-control wheelEvent=ignore hacks in the settings panel are superseded. Setting lives in AppSettings (appearance config scope) with zh/en strings and takes effect live from the toggle. Closes upstream issue 1756141021#3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
给「鼠标滚轮调整数值」加独立开关,默认关闭——解决滚动页面时滚轮误触改动数值框/滑块/下拉的问题。
Closes #3
实现
wheel_guard.py,单个 QApplication 事件过滤器覆盖现有及未来所有控件,无需改动任何创建点):pixelDelta像素级平滑;不派发合成事件,避免 macOS 触控板 phase/惯性状态被打乱wheel_adjust_enabled存入 AppSettings,随「外观」配置域导入导出wheelEvent = ignore硬屏蔽一并由开关接管(此前即使想用滚轮调值也调不了)验证
ruff check+pytest(137 例)全绿🤖 Generated with Claude Code