Add list_row macro to simplify alternative list items
This commit is contained in:
parent
f09a3109e8
commit
153437b3b0
2 changed files with 19 additions and 8 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue