mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 20:52:19 +00:00
Align pixel scroll direction with OS
This commit is contained in:
parent
9331cf3596
commit
15dbb6965f
1 changed files with 2 additions and 2 deletions
|
|
@ -1276,9 +1276,9 @@ scroll_event(double xoffset, double yoffset, int flags, int modifiers) {
|
|||
if (!screen->modes.mouse_tracking_mode && pixel_scroll_enabled_for_screen(screen) && (is_high_resolution || is_value120)) {
|
||||
double delta_pixels = 0.0;
|
||||
if (is_high_resolution) {
|
||||
delta_pixels = -yoffset * OPT(touch_scroll_multiplier);
|
||||
delta_pixels = yoffset * OPT(touch_scroll_multiplier);
|
||||
} else {
|
||||
const double offset_lines = (-yoffset / 120.) * OPT(wheel_scroll_multiplier);
|
||||
const double offset_lines = (yoffset / 120.) * OPT(wheel_scroll_multiplier);
|
||||
delta_pixels = offset_lines * global_state.callback_os_window->fonts_data->fcm.cell_height;
|
||||
}
|
||||
screen->pending_scroll_pixels_y = 0.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue