diff options
Diffstat (limited to 'alacritty/src/input/mod.rs')
-rw-r--r-- | alacritty/src/input/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alacritty/src/input/mod.rs b/alacritty/src/input/mod.rs index a465fd37..5e8a4bfd 100644 --- a/alacritty/src/input/mod.rs +++ b/alacritty/src/input/mod.rs @@ -48,7 +48,7 @@ use crate::scheduler::{Scheduler, TimerId, Topic}; pub mod keyboard; /// Font size change interval in px. -pub const FONT_SIZE_STEP: i32 = 1; +pub const FONT_SIZE_STEP: f32 = 1.; /// Interval for mouse scrolling during selection outside of the boundaries. const SELECTION_SCROLLING_INTERVAL: Duration = Duration::from_millis(15); @@ -98,7 +98,7 @@ pub trait ActionContext<T: EventListener> { fn create_new_window(&mut self, _tabbing_id: Option<String>) {} #[cfg(not(target_os = "macos"))] fn create_new_window(&mut self) {} - fn change_font_size(&mut self, _delta: i32) {} + fn change_font_size(&mut self, _delta: f32) {} fn reset_font_size(&mut self) {} fn pop_message(&mut self) {} fn message(&self) -> Option<&Message>; @@ -865,7 +865,7 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> { }, TouchPurpose::Zoom(zoom) => { let font_delta = zoom.font_delta(touch); - self.ctx.change_font_size(font_delta as i32); + self.ctx.change_font_size(font_delta); }, TouchPurpose::Scroll(last_touch) => { // Calculate delta and update last touch position. |