diff options
author | 2022-06-07 03:28:41 +0200 | |
---|---|---|
committer | 2022-06-07 03:28:41 +0200 | |
commit | 2933ac7355d5c14aa4f04a64a67197cd97e7608c (patch) | |
tree | 9c4c6c01c95fa27a2080361ae388e128f208f645 /examples | |
parent | de21a651c0616307bb6bfd36da1a06119e629b10 (diff) | |
download | iced-2933ac7355d5c14aa4f04a64a67197cd97e7608c.tar.gz iced-2933ac7355d5c14aa4f04a64a67197cd97e7608c.tar.bz2 iced-2933ac7355d5c14aa4f04a64a67197cd97e7608c.zip |
Remove `style` module leftover in `scrollable` example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/scrollable/src/style.rs | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs deleted file mode 100644 index c2c48470..00000000 --- a/examples/scrollable/src/style.rs +++ /dev/null @@ -1,52 +0,0 @@ -use iced::container; - -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum Theme { - Light, - Dark, -} - -impl Theme { - pub const ALL: [Theme; 2] = [Theme::Light, Theme::Dark]; -} - -impl Default for Theme { - fn default() -> Theme { - Theme::Light - } -} - -impl<'a> From<Theme> for Box<dyn container::StyleSheet + 'a> { - fn from(theme: Theme) -> Self { - match theme { - Theme::Light => Default::default(), - Theme::Dark => dark::Container.into(), - } - } -} - -mod dark { - use iced::{container, Color}; - - const BACKGROUND: Color = Color::from_rgb( - 0x36 as f32 / 255.0, - 0x39 as f32 / 255.0, - 0x3F as f32 / 255.0, - ); - - pub struct Container; - - impl container::StyleSheet for Container { - fn style(&self) -> container::Style { - container::Style { - background: Color { - a: 0.99, - ..BACKGROUND - } - .into(), - text_color: Color::WHITE.into(), - ..container::Style::default() - } - } - } -} |