summaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
authorFelippe da Motta Raposo <raposo.felippe@gmail.com>2018-06-08 16:32:21 -0700
committerChristian Duerr <chrisduerr@users.noreply.github.com>2018-06-08 23:32:21 +0000
commit6cbae83f174fa6d114ea66b1f8dd6185950ca835 (patch)
tree178a869a7fce12cc34eecd684a17d6340c9cd589 /src/event.rs
parent66acf1e03da4d0206e3368bf58953b071887ccb2 (diff)
downloadalacritty-6cbae83f174fa6d114ea66b1f8dd6185950ca835.tar.gz
alacritty-6cbae83f174fa6d114ea66b1f8dd6185950ca835.zip
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.
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs2
1 files changed, 1 insertions, 1 deletions
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);
}