fix: text button

This commit is contained in:
Ashley Wulber 2025-10-16 13:19:55 -04:00
parent 89029994a5
commit 7cae9aa47d
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

View file

@ -269,28 +269,15 @@ impl Context {
(applet_padding_minor_axis, applet_padding_major_axis) (applet_padding_minor_axis, applet_padding_major_axis)
}; };
crate::widget::button::custom( crate::widget::button::custom(
Row::with_children(vec![ layer_container(
Column::with_children(vec![ Text::from(text)
Text::from(text).into(), .height(Length::Fill)
horizontal_space() .align_y(Alignment::Center),
.width(Length::Fixed( )
(suggested.0 as f32 + 2. * horizontal_padding as f32), .center_y(Length::Fixed(f32::from(suggested.1 + 2 * vertical_padding))),
))
.width(Length::Shrink)
.height(Length::Shrink)
.into(),
])
.align_x(Alignment::Center)
.into(),
vertical_space()
.height(Length::Fixed(
(suggested.1 as f32 + 2. * vertical_padding as f32),
))
.into(),
])
.align_y(Alignment::Center),
) )
.on_press_down(message) .on_press_down(message)
.padding([0, horizontal_padding])
.class(crate::theme::Button::AppletIcon) .class(crate::theme::Button::AppletIcon)
} }