Skip to content

Commit 0d240c1

Browse files
committed
simplify tab underline calculation
Signed-off-by: William Casarin <[email protected]>
1 parent 95c526f commit 0d240c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/timeline.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ fn tabs_ui(ui: &mut egui::Ui) {
9797
// underline
9898
if state.is_selected() {
9999
let rect = res.rect;
100-
let underline = rect.x_range().shrink(rect.width() / 4.0);
101-
let underline = shrink_range_to_width(underline, get_label_width(ui, txt) * 1.15);
100+
let underline =
101+
shrink_range_to_width(rect.x_range(), get_label_width(ui, txt) * 1.15);
102102
let underline_y = ui.painter().round_to_pixel(rect.bottom()) - 1.5;
103103
return (underline, underline_y);
104104
}

0 commit comments

Comments
 (0)