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
parent a50294676d
commit bd9b3bff25
22 changed files with 1222 additions and 738 deletions

View file

@ -1,9 +1,4 @@
use iced::{
Background,
Color,
Theme,
widget
};
use iced::{widget, Background, Color, Theme};
#[macro_export]
macro_rules! nav_bar {
@ -42,21 +37,16 @@ pub fn nav_bar_style(theme: &Theme) -> widget::container::Appearance {
#[macro_export]
macro_rules! nav_button {
($icon: expr, $title:expr, $condensed:expr) => ({
($icon: expr, $title:expr, $condensed:expr) => {{
if $condensed {
$crate::iced::widget::Button::new(
$crate::widget::icon($icon, 22)
)
.padding(8)
$crate::iced::widget::Button::new($crate::widget::icon($icon, 22)).padding(8)
} else {
$crate::widget::button!(
$crate::widget::icon($icon, 22),
$crate::iced::widget::Text::new($title),
$crate::iced::widget::horizontal_space(
$crate::iced::Length::Fill
),
$crate::iced::widget::horizontal_space($crate::iced::Length::Fill),
)
}
});
}};
}
pub use nav_button;