fix: text button
This commit is contained in:
parent
89029994a5
commit
7cae9aa47d
1 changed files with 7 additions and 20 deletions
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue