diff options
author | 2019-12-04 22:02:07 +0100 | |
---|---|---|
committer | 2019-12-04 22:02:07 +0100 | |
commit | 33ad332ce99fff5de8e50a5b5c98f3ce181c311a (patch) | |
tree | 256269a85712c96d6e43b02c9343a8265599b081 /core/src/background.rs | |
parent | ed045b45ba9490b6020618fb13c7dbc3ea5032ab (diff) | |
download | iced-33ad332ce99fff5de8e50a5b5c98f3ce181c311a.tar.gz iced-33ad332ce99fff5de8e50a5b5c98f3ce181c311a.tar.bz2 iced-33ad332ce99fff5de8e50a5b5c98f3ce181c311a.zip |
Implemented `From<Color` for `Background`
Diffstat (limited to 'core/src/background.rs')
-rw-r--r-- | core/src/background.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/background.rs b/core/src/background.rs index 98047172..2f75e45c 100644 --- a/core/src/background.rs +++ b/core/src/background.rs @@ -7,3 +7,9 @@ pub enum Background { Color(Color), // TODO: Add gradient and image variants } + +impl From<Color> for Background { + fn from(color: Color) -> Self { + Background::Color(color) + } +}
\ No newline at end of file |