notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 0d240c16a5337a349b3c63a67ea4814673ca2ec5
parent 95c526f4536a7be89717ffae37a64042ca75061b
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 15 May 2024 18:01:48 -0700

simplify tab underline calculation

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/timeline.rs | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/timeline.rs b/src/timeline.rs @@ -97,8 +97,8 @@ fn tabs_ui(ui: &mut egui::Ui) { // underline if state.is_selected() { let rect = res.rect; - let underline = rect.x_range().shrink(rect.width() / 4.0); - let underline = shrink_range_to_width(underline, get_label_width(ui, txt) * 1.15); + let underline = + shrink_range_to_width(rect.x_range(), get_label_width(ui, txt) * 1.15); let underline_y = ui.painter().round_to_pixel(rect.bottom()) - 1.5; return (underline, underline_y); }