fix: text position in stack

This commit is contained in:
Ashley Wulber 2026-03-02 15:42:04 -05:00 committed by Ashley Wulber
parent 8fdef03d88
commit ba84ee9324
2 changed files with 81 additions and 38 deletions

View file

@ -142,7 +142,10 @@ impl<Message> Widget<Message, cosmic::Theme, cosmic::Renderer> for TabText {
renderer.with_layer(bounds, |renderer| {
renderer.fill_paragraph(
&state.paragraph,
Point::new(bounds.x, bounds.y + bounds.height / 2.0),
Point::new(
bounds.x,
bounds.y + bounds.height / 2.0 - state.paragraph.min_bounds().height / 2.0,
),
style.text_color,
bounds,
);