Skip to content

Commit 51603d8

Browse files
committed
Fix last_y for actions in list_view
1 parent 6335f79 commit 51603d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/draw/list_view.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,18 +195,18 @@ where
195195

196196
if i == selected_item && has_subname {
197197
if let Some(subname) = item.subname {
198+
let y_offset = pos.y + entry_height + item_spacing;
198199
font.draw(
199200
dt,
200201
subname,
201202
font_size,
202-
Point::new(
203-
pos.x + self.params.action_left_margin,
204-
pos.y + entry_height + item_spacing,
205-
),
206-
Point::new(end_pos.x, pos.y + entry_height + item_spacing),
203+
Point::new(pos.x + self.params.action_left_margin, y_offset),
204+
Point::new(end_pos.x, y_offset),
207205
FontColor::Single(self.params.font_color.as_source()),
208206
&draw_opts,
209207
);
208+
209+
last_y = y_offset as u32;
210210
}
211211
}
212212
}

0 commit comments

Comments
 (0)