Skip to content

Commit

Permalink
Don't ceil values for font width or height
Browse files Browse the repository at this point in the history
Since the font size is user-configurable, don't
`ceil` the font height or width.
  • Loading branch information
smolck committed Dec 10, 2019
1 parent 001d4ff commit 9371f5d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/ui/grid/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ impl Grid {
ctx.queue_draw_area.push((
x.ceil() as i32,
y.ceil() as i32,
w.ceil() as i32,
h.ceil() as i32,
w as i32,
h as i32,
));
ctx.cursor.0 = row;
ctx.cursor.1 = col;
Expand All @@ -344,8 +344,8 @@ impl Grid {
ctx.queue_draw_area.push((
x.ceil() as i32,
y.ceil() as i32,
w.ceil() as i32,
h.ceil() as i32,
w as i32,
h as i32,
));

if let Some(ref im_context) = self.im_context {
Expand Down
12 changes: 6 additions & 6 deletions src/ui/grid/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ fn put_segments(
queue_draw_area.push((
x.ceil() as i32,
y.ceil() as i32,
w.ceil() as i32,
h.ceil() as i32,
w as i32,
h as i32,
));
}
}
Expand Down Expand Up @@ -312,8 +312,8 @@ pub fn scroll(ctx: &mut Context, hl_defs: &HlDefs, reg: [u64; 4], count: i64) {
ctx.queue_draw_area.push((
x1.ceil() as i32,
y1.ceil() as i32,
w.ceil() as i32,
h.ceil() as i32,
w as i32,
h as i32,
));

// Clear the area that is left "dirty".
Expand All @@ -333,8 +333,8 @@ pub fn scroll(ctx: &mut Context, hl_defs: &HlDefs, reg: [u64; 4], count: i64) {
ctx.queue_draw_area.push((
x1.ceil() as i32,
y1.ceil() as i32,
w.ceil() as i32,
h.ceil() as i32,
w as i32,
h as i32,
));

cr.restore();
Expand Down

0 comments on commit 9371f5d

Please sign in to comment.