From 6cbae83f174fa6d114ea66b1f8dd6185950ca835 Mon Sep 17 00:00:00 2001 From: Felippe da Motta Raposo Date: Fri, 8 Jun 2018 16:32:21 -0700 Subject: Reduce Increase-/DecreaseFontSize step to 0.5 Until now the Increase-/DecreaseFontSize keybinds hand a step size of 1.0. Since the font size however is multiplied by two to allow more granular font size control, this lead to the bindings skipping one font size (incrementing/decrementing by +-2). To fix this the step size of the Increase-/DecreaseFontSize bindings has been reduced to the minimum step size that exists with the current font configuration (0.5). This should allow users to increment and decrement the font size by a single point instead of two. This also adds a few tests to make sure the methods for increasing/decreasing/resetting font size work properly. --- src/event.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/event.rs') diff --git a/src/event.rs b/src/event.rs index 4ae25860..f592da5c 100644 --- a/src/event.rs +++ b/src/event.rs @@ -106,7 +106,7 @@ impl<'a, N: Notify + 'a> input::ActionContext for ActionContext<'a, N> { self.terminal.pixels_to_coords(self.mouse.x as usize, self.mouse.y as usize) } - fn change_font_size(&mut self, delta: i8) { + fn change_font_size(&mut self, delta: f32) { self.terminal.change_font_size(delta); } -- cgit