linux: scrolling improvements (#9103)
This PR adjusts scrolling to be a lot faster on Linux and also makes terminal scrolling work. For Wayland, it makes scrolling faster by handling the `AxisValue120` event (which also allows high-resolution scrolling on supported mice) On X11, changed the 1 line per scroll to 3. ### Different solutions I tried replicating Chromium's scrolling behaviour, but it was inconsistent in X11/Wayland and found it too fast on Wayland. Plus, it also didn't match VSCode, since it seems that they do something different. Release Notes: - Made scrolling faster on Linux - Made terminal scroll on Linux
This commit is contained in:
parent
c0f8581b29
commit
d8e32c3e3c
4 changed files with 68 additions and 10 deletions
|
@ -70,7 +70,10 @@ actions!(
|
|||
///Scrolling is unbearably sluggish by default. Alacritty supports a configurable
|
||||
///Scroll multiplier that is set to 3 by default. This will be removed when I
|
||||
///Implement scroll bars.
|
||||
#[cfg(target_os = "macos")]
|
||||
const SCROLL_MULTIPLIER: f32 = 4.;
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
const SCROLL_MULTIPLIER: f32 = 1.;
|
||||
const MAX_SEARCH_LINES: usize = 100;
|
||||
const DEBUG_TERMINAL_WIDTH: Pixels = px(500.);
|
||||
const DEBUG_TERMINAL_HEIGHT: Pixels = px(30.);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue