Skip to content

Commit

Permalink
fix cursor inconsitencies (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Jun 15, 2023
1 parent 8e8b634 commit 76bda97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 0 additions & 7 deletions rio/src/screen/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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("")
// };
}
6 changes: 3 additions & 3 deletions sugarloaf/src/sugarloaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 76bda97

Please sign in to comment.