Use Borrow for both options and selected in PickList
This commit is contained in:
parent
52e207b89b
commit
f53cfb8efa
5 changed files with 46 additions and 48 deletions
|
|
@ -55,12 +55,8 @@ impl Sandbox for Styling {
|
|||
fn view(&self) -> Element<Message> {
|
||||
let choose_theme = column![
|
||||
text("Theme:"),
|
||||
pick_list(
|
||||
Theme::ALL,
|
||||
Some(self.theme.clone()),
|
||||
Message::ThemeChanged
|
||||
)
|
||||
.width(Length::Fill),
|
||||
pick_list(Theme::ALL, Some(&self.theme), Message::ThemeChanged)
|
||||
.width(Length::Fill),
|
||||
]
|
||||
.spacing(10);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue