Implemented Expander

- Updated example to show behavior
- Created styles for Expander and ExpanderRow
- Simpler implementation of `ExpanderRow`
- Deleted `ExpanderData` and replaced it with `ExpanderRow`
- Every row can now have child rows.
- Ran cargo fmt.
- Deleted settings example
- Added expander to cosmic example
- Expander icons now render

ListBox partially implemented
This commit is contained in:
Eduardo Flores 2022-10-09 11:25:46 -07:00 committed by Michael Murphy
parent a50294676d
commit 7743d0d084
22 changed files with 1222 additions and 738 deletions

View file

@ -1,7 +1,4 @@
use iced::{
Length,
widget::svg,
};
use iced::{widget::svg, Length};
pub fn icon(name: &str, size: u16) -> svg::Svg {
let handle = match freedesktop_icons::lookup(name)
@ -15,7 +12,7 @@ pub fn icon(name: &str, size: u16) -> svg::Svg {
None => {
eprintln!("icon '{}' size {} not found", name, size);
svg::Handle::from_memory(Vec::new())
},
}
};
svg::Svg::new(handle)
.width(Length::Units(size))