Skip to content

Commit

Permalink
[design & perf] starting measure vertical line only once
Browse files Browse the repository at this point in the history
  • Loading branch information
agourlay committed Feb 15, 2025
1 parent efc1de3 commit 46f6948
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/ui/canvas_measure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,15 @@ impl canvas::Program<Message> for CanvasMeasure {
let color_gray = Color::from_rgb8(0x40, 0x44, 0x4B);
let color_dark_red = Color::from_rgb8(200, 50, 50);

// draw first measure vertical line
// TODO draw only for the first measure because the end measure will be the start of the next measure
draw_measure_vertical_line(
frame,
vertical_measure_height,
measure_start_x,
measure_start_y,
);
// draw first vertical line only for measure at the of rows
if bounds.x == MEASURE_NOTES_PADDING {
draw_measure_vertical_line(
frame,
vertical_measure_height,
measure_start_x,
measure_start_y,
);
}

// draw focused box
if self.is_focused {
Expand Down

0 comments on commit 46f6948

Please sign in to comment.