Skip to content

Commit

Permalink
Fix last_y for actions in list_view
Browse files Browse the repository at this point in the history
  • Loading branch information
filtsin committed Mar 22, 2023
1 parent 52b6dfa commit 2d3e557
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/draw/list_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,17 @@ where
font.draw(dt, item.name, font_size, pos, color, &draw_opts);
if i == selected_item && has_subname {
if let Some(subname) = item.subname {
let y_offset = pos.y + entry_height + item_spacing;
font.draw(
dt,
subname,
font_size,
Point::new(
pos.x + self.params.action_left_margin,
pos.y + entry_height + item_spacing,
),
Point::new(pos.x + self.params.action_left_margin, y_offset),
FontColor::Single(self.params.font_color.as_source()),
&draw_opts,
);

last_y = y_offset as u32;
}
}
}
Expand Down

0 comments on commit 2d3e557

Please sign in to comment.