forked from 1b-agent/opencadstudio-upstream
feat(viewport): optional touchpad pan for wheel-scrolling touchpads
Outside macOS a touchpad's two-finger drag arrives as wheel scrolls that nothing tells from a wheel. A new option (Options, off by default) makes every scroll pan and Ctrl+scroll — what a pinch sends there — zoom. Fixes #1560 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
17d2954098
commit
69057c55da
29 files changed
+83
-11
No files matched your search
@@ -59,6 +59,8 @@ pub struct AppPrefs {
|
||||
pub commandline_fade_ms: i32,
|
||||
/// ZOOMWHEEL: reverse the mouse-wheel zoom direction.
|
||||
pub zoom_wheel_reversed: bool,
|
||||
/// Scroll pans and Ctrl+scroll zooms (touchpads).
|
||||
pub touchpad_pan: bool,
|
||||
/// ZOOMFACTOR. The slider sets the range the system variable has; the
|
||||
/// field beside it reaches `settings::ZOOM_FACTOR_MAX`.
|
||||
pub zoom_factor: i32,
|
||||
@@ -1254,6 +1256,15 @@ pub fn view_window<'a>(
|
||||
]
|
||||
.spacing(8)
|
||||
.align_y(iced::Center),
|
||||
Space::new().height(8),
|
||||
row![
|
||||
iced::widget::checkbox(prefs.touchpad_pan)
|
||||
.on_toggle(Message::TouchpadPanChanged)
|
||||
.size(15),
|
||||
text(crate::t!("Touchpad: scroll pans, Ctrl+scroll or pinch zooms")).size(12),
|
||||
]
|
||||
.spacing(8)
|
||||
.align_y(iced::Center),
|
||||
Space::new().height(12),
|
||||
row![
|
||||
text(crate::t!("Zoom factor")).size(12).width(150),
|
||||
|
||||
Reference in new issue
Block a user