summaryrefslogtreecommitdiffstats
path: root/style
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-20 13:34:07 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-20 13:34:07 +0100
commitbf375587aa52808cdabf4191571f20784315ea99 (patch)
treea723b82d7712fc775cce126b8e45e31bafd22e10 /style
parente736038d5ff9adb9c011326879d4c772338d12d9 (diff)
downloadiced-bf375587aa52808cdabf4191571f20784315ea99.tar.gz
iced-bf375587aa52808cdabf4191571f20784315ea99.tar.bz2
iced-bf375587aa52808cdabf4191571f20784315ea99.zip
Add `Shadow` to `container::Appearance`
Diffstat (limited to 'style')
-rw-r--r--style/src/container.rs4
-rw-r--r--style/src/theme.rs3
2 files changed, 5 insertions, 2 deletions
diff --git a/style/src/container.rs b/style/src/container.rs
index a490c187..00649c25 100644
--- a/style/src/container.rs
+++ b/style/src/container.rs
@@ -1,5 +1,5 @@
//! Change the appearance of a container.
-use crate::core::{Background, Border, Color, Pixels};
+use crate::core::{Background, Border, Color, Pixels, Shadow};
/// The appearance of a container.
#[derive(Debug, Clone, Copy, Default)]
@@ -10,6 +10,8 @@ pub struct Appearance {
pub background: Option<Background>,
/// The [`Border`] of the container.
pub border: Border,
+ /// The [`Shadow`] of the container.
+ pub shadow: Shadow,
}
impl Appearance {
diff --git a/style/src/theme.rs b/style/src/theme.rs
index d90efb0a..8d1ff237 100644
--- a/style/src/theme.rs
+++ b/style/src/theme.rs
@@ -21,7 +21,7 @@ use crate::text_editor;
use crate::text_input;
use crate::toggler;
-use crate::core::{Background, Border, Color, Vector};
+use crate::core::{Background, Border, Color, Shadow, Vector};
use std::fmt;
use std::rc::Rc;
@@ -434,6 +434,7 @@ impl container::StyleSheet for Theme {
text_color: None,
background: Some(palette.background.weak.color.into()),
border: Border::with_radius(2),
+ shadow: Shadow::default(),
}
}
Container::Custom(custom) => custom.appearance(self),