use crate::core::message::Message;
use crate::core::storage::all_themes;
use iced::widget::{container, pick_list};
use iced::{Alignment, Element, Length, Theme};
pub fn theme_selector(current_theme: &Theme) -> Element<'static, Message> {
let themes = all_themes();
pick_list(themes, Some(current_theme.clone()), Message::ThemeChanged)
.placeholder("Select theme")
.text_size(14.0)
.width(Length::Fixed(200.0))
.into()
}
pub fn theme_selector_right(current_theme: &Theme) -> Element<'static, Message> {
use iced::widget::{row, Space};
container(
row![
Space::new().width(Length::Fill),
theme_selector(current_theme),
]
.align_y(Alignment::Start),
)
.padding(20)
.into()
}