Add list_row macro to simplify alternative list items

This commit is contained in:
Jeremy Soller 2022-09-30 11:04:56 -06:00
parent f09a3109e8
commit 153437b3b0
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
2 changed files with 19 additions and 8 deletions

View file

@ -3,6 +3,7 @@ use cosmic::{
button,
icon,
list_item,
list_row,
list_section,
list_view,
nav_bar,
@ -123,7 +124,7 @@ impl Sandbox for Window {
),
list_section!(
"Buttons",
row!(
list_row!(
button!("Primary")
.style(theme::Button::Primary)
.on_press(Message::ButtonPressed)
@ -144,8 +145,8 @@ impl Sandbox for Window {
.style(theme::Button::Text)
.on_press(Message::ButtonPressed)
,
).spacing(12),
row!(
),
list_row!(
button!("Primary")
.style(theme::Button::Primary)
.padding([8, 16])
@ -166,7 +167,7 @@ impl Sandbox for Window {
.style(theme::Button::Text)
.padding([8, 16])
,
).spacing(12),
),
),
list_section!(
"Controls",