Fix the vertical alignment of the label in the switch component

This commit is contained in:
dtonon 2024-06-21 20:00:23 +02:00
parent 42130dc530
commit 6a7fe30d88

View File

@ -308,7 +308,7 @@ fn draw_at(
let text_pos = switch_rect.right_top() let text_pos = switch_rect.right_top()
+ vec2( + vec2(
ui.spacing().item_spacing.x, ui.spacing().item_spacing.x,
(switch_rect.height() - galley.rect.height()) / 2.0, (switch_rect.height() - galley.rect.height()) / 2.0 + 0.5,
); );
ui.painter().galley_with_override_text_color( ui.painter().galley_with_override_text_color(
text_pos, text_pos,