Skip to content

Commit 2d3e557

Browse files
committed
Fix last_y for actions in list_view
1 parent 52b6dfa commit 2d3e557

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/draw/list_view.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,17 @@ where
192192
font.draw(dt, item.name, font_size, pos, color, &draw_opts);
193193
if i == selected_item && has_subname {
194194
if let Some(subname) = item.subname {
195+
let y_offset = pos.y + entry_height + item_spacing;
195196
font.draw(
196197
dt,
197198
subname,
198199
font_size,
199-
Point::new(
200-
pos.x + self.params.action_left_margin,
201-
pos.y + entry_height + item_spacing,
202-
),
200+
Point::new(pos.x + self.params.action_left_margin, y_offset),
203201
FontColor::Single(self.params.font_color.as_source()),
204202
&draw_opts,
205203
);
204+
205+
last_y = y_offset as u32;
206206
}
207207
}
208208
}

0 commit comments

Comments
 (0)