From 76bda9753967d6c0bd6c6de1d4891535c5ec7634 Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Thu, 15 Jun 2023 22:01:28 +0200 Subject: [PATCH] fix cursor inconsitencies (#95) --- rio/src/screen/state.rs | 7 ------- sugarloaf/src/sugarloaf.rs | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/rio/src/screen/state.rs b/rio/src/screen/state.rs index fae4d8f52c..a4fe3f5419 100644 --- a/rio/src/screen/state.rs +++ b/rio/src/screen/state.rs @@ -402,11 +402,4 @@ impl State { sugarloaf.pile_rect(renderable_tabs); } } - - // pub fn topbar(&mut self, command: String) { - // let fps_text = if self.config.developer.enable_fps_counter { - // format!(" fps_{:?}", self.fps.tick()) - // } else { - // String::from("") - // }; } diff --git a/sugarloaf/src/sugarloaf.rs b/sugarloaf/src/sugarloaf.rs index 766d24e93c..d0a1c5741c 100644 --- a/sugarloaf/src/sugarloaf.rs +++ b/sugarloaf/src/sugarloaf.rs @@ -262,17 +262,17 @@ impl Sugarloaf { self.acc_line_y, ], color: sugar.background_color, - size: [add_pos_x * mod_size, self.font_bounds.default.0 * mod_size], + size: [add_pos_x * mod_size, self.font_bounds.default.1 * mod_size], }); if let Some(decoration) = &sugar.decoration { let dx = add_pos_x; - let dy = self.font_bounds.default.1 / self.ctx.scale; + let dy = self.font_bounds.default.1 / 2.; self.rects.push(Rect { position: [ (style.screen_position.0 / self.ctx.scale) + x - + dx * decoration.position.0 / self.ctx.scale, + + ((dx * decoration.position.0) / self.ctx.scale), self.acc_line_y + dy * decoration.position.1, ], color: decoration.color,