Skip to content

Mark Space widget as Copy and Clone#3172

Open
Shadowcat650 wants to merge 2 commits intoiced-rs:masterfrom
Shadowcat650:master
Open

Mark Space widget as Copy and Clone#3172
Shadowcat650 wants to merge 2 commits intoiced-rs:masterfrom
Shadowcat650:master

Conversation

@Shadowcat650
Copy link
Copy Markdown

This makes usage more ergonomic when multiple Space identical objects are used.

For example, this situation:

let search_header = row![
    Space::new().width(Length::FillPortion(1)),
    searchbar.width(Length::FillPortion(4)),
    Space::new().width(Length::FillPortion(1)),
];

Becomes:

let space = Space::new().width(Length::FillPortion(1));
let search_header = row![
    space,
    searchbar.width(Length::FillPortion(4)),
    space,
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant