Skip to content

Commit 1aa2c32

Browse files
committed
correction on modifier
1 parent 1a7a9c1 commit 1aa2c32

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sugarloaf/src/sugarloaf.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ impl Sugarloaf {
504504
color: stack[i].background_color,
505505
size: [
506506
width_bound * quantity as f32,
507-
(self.layout.sugarheight - 0.5),
507+
(self.layout.sugarheight),
508508
],
509509
});
510510

@@ -529,9 +529,8 @@ impl Sugarloaf {
529529
scaled_rect_pos_y,
530530
stack[i].background_color,
531531
width_bound * quantity as f32,
532-
// 0.5 is a modifier applied in the font size to don't
533-
// overflow rect height
534-
self.layout.sugarheight - 0.5,
532+
// 1.0 is subtracted on font size so to doesn't overflow rect height
533+
self.layout.sugarheight - 0.8,
535534
);
536535

537536
// If the next rect background color is different the push rect

0 commit comments

Comments
 (0)