chore(examples): icon API update

This commit is contained in:
Michael Aaron Murphy 2023-09-13 16:01:04 +02:00 committed by Michael Murphy
parent 9dbc1be269
commit 0eba498708
5 changed files with 12 additions and 19 deletions

View file

@ -257,9 +257,7 @@ impl State {
))
.add(settings::item_row(vec![
cosmic::widget::button::destructive("Do not Touch")
.trailing_icon(
icon::handle::from_name("dialog-warning-symbolic").size(16),
)
.trailing_icon(icon::from_name("dialog-warning-symbolic").size(16))
.on_press(Message::ToggleWarning)
.into(),
]))
@ -422,10 +420,10 @@ impl State {
"Primary container with some text and a couple icons testing default fallbacks"
)
.size(24),
icon::handle::from_name("microphone-sensitivity-high-symbolic-test")
icon::from_name("microphone-sensitivity-high-symbolic-test")
.size(24)
.icon(),
icon::handle::from_name("microphone-sensitivity-high-symbolic-test")
icon::from_name("microphone-sensitivity-high-symbolic-test")
.size(24)
.fallback(false)
.icon(),

View file

@ -66,7 +66,7 @@ impl State {
.on_close(Message::Close)
.width(Length::Shrink);
let new_tab_button = icon::handle::from_name("tab-new-symbolic")
let new_tab_button = icon::from_name("tab-new-symbolic")
.size(20)
.apply(button::icon)
.on_press(Message::AddNew);

View file

@ -62,7 +62,7 @@ impl State {
window.parent_page_button(SystemAndAccountsPage::About),
row!(
horizontal_space(Length::Fill),
icon::handle::from_name("distributor-logo").size(78).icon(),
icon::from_name("distributor-logo").size(78).icon(),
horizontal_space(Length::Fill),
)
.into(),