Add a setting to control the vertical and horizontal scroll sensitivity (#10244)
Some people (like myself) use touchpads for development and I find Zed's default scroll sensitivity to be slower than I like. This change adds a scroll sensitivity multiplier that allows users to customize the speed of their scrolling. Release Notes: - Added a setting under "scroll_sensitivity" that allows user to control the scroll sensitivity. This value acts as a multiplier for the horizontal and vertical scroll speed.
This commit is contained in:
parent
faebce8cd0
commit
1911a9f39b
3 changed files with 19 additions and 3 deletions
|
@ -15,6 +15,7 @@ pub struct EditorSettings {
|
|||
pub scrollbar: Scrollbar,
|
||||
pub gutter: Gutter,
|
||||
pub vertical_scroll_margin: f32,
|
||||
pub scroll_sensitivity: f32,
|
||||
pub relative_line_numbers: bool,
|
||||
pub seed_search_query_from_cursor: SeedQuerySetting,
|
||||
pub multi_cursor_modifier: MultiCursorModifier,
|
||||
|
@ -138,6 +139,11 @@ pub struct EditorSettingsContent {
|
|||
///
|
||||
/// Default: 3.
|
||||
pub vertical_scroll_margin: Option<f32>,
|
||||
/// Scroll sensitivity multiplier. This multiplier is applied
|
||||
/// to both the horizontal and vertical delta values while scrolling.
|
||||
///
|
||||
/// Default: 1.0
|
||||
pub scroll_sensitivity: Option<f32>,
|
||||
/// Whether the line numbers on editors gutter are relative or not.
|
||||
///
|
||||
/// Default: false
|
||||
|
@ -178,7 +184,7 @@ pub struct ToolbarContent {
|
|||
}
|
||||
|
||||
/// Scrollbar related settings
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
|
||||
pub struct ScrollbarContent {
|
||||
/// When to show the scrollbar in the editor.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue