refactor(widget): improvements to button and icon widgets
This commit is contained in:
parent
7f0943924a
commit
9dbc1be269
20 changed files with 399 additions and 558 deletions
|
|
@ -42,7 +42,7 @@ impl<'a, Message: 'static + Clone> Field<'a, Message> {
|
|||
|
||||
row::with_capacity(3)
|
||||
.push(
|
||||
icon::handle::from_svg_bytes(&include_bytes!("search.svg")[..])
|
||||
icon::from_svg_bytes(&include_bytes!("search.svg")[..])
|
||||
.symbolic(true)
|
||||
.icon()
|
||||
.size(16),
|
||||
|
|
@ -67,7 +67,7 @@ impl<'a, Message: 'static + Clone> From<Field<'a, Message>> for crate::Element<'
|
|||
}
|
||||
|
||||
fn clear_button<Message: 'static>() -> crate::widget::IconButton<'static, Message> {
|
||||
icon::handle::from_name("edit-clear-symbolic")
|
||||
icon::from_name("edit-clear-symbolic")
|
||||
.size(16)
|
||||
.apply(crate::widget::button::icon)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ mod button {
|
|||
/// A search button which converts to a search [`field`] on click.
|
||||
#[must_use]
|
||||
pub fn button<Message: 'static + Clone>(on_press: Message) -> crate::Element<'static, Message> {
|
||||
icon::handle::from_svg_bytes(&include_bytes!("search.svg")[..])
|
||||
icon::from_svg_bytes(&include_bytes!("search.svg")[..])
|
||||
.symbolic(true)
|
||||
.apply(crate::widget::button::icon)
|
||||
.on_press(on_press)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue