mirror of
https://github.com/danbulant/cushy
synced 2026-07-05 11:10:34 +00:00
Merge pull request #191 from hydra/add-clear-to-widget-list
Add `clear` to `WidgetList`
This commit is contained in:
commit
f08b7064ec
1 changed files with 5 additions and 0 deletions
|
|
@ -2156,6 +2156,11 @@ impl WidgetList {
|
||||||
self.ordered.truncate(length);
|
self.ordered.truncate(length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Clear the list
|
||||||
|
pub fn clear(&mut self) {
|
||||||
|
self.ordered.clear();
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns `self` as a vertical [`Stack`] of rows.
|
/// Returns `self` as a vertical [`Stack`] of rows.
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn into_rows(self) -> Stack {
|
pub fn into_rows(self) -> Stack {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue