From 142ff7ae3abf8477073d71fe07a25bff6ac07084 Mon Sep 17 00:00:00 2001 From: hodasemi Date: Wed, 24 Apr 2024 14:41:28 +0200 Subject: [PATCH] Prelude Displayable filltype --- src/elements/fill_type.rs | 6 ++++++ src/guihandler/prelude.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/elements/fill_type.rs b/src/elements/fill_type.rs index 5f09733..e73f04b 100644 --- a/src/elements/fill_type.rs +++ b/src/elements/fill_type.rs @@ -24,6 +24,12 @@ impl From<(Color, DisplayableFillType)> for FillTypeInfo { } } +impl From for FillTypeInfo { + fn from(color: Color) -> Self { + Self::Color(color, DisplayableFillType::Expand) + } +} + impl From for FillTypeInfo { fn from(s: String) -> Self { Self::Image(AssetPath::from(s)) diff --git a/src/guihandler/prelude.rs b/src/guihandler/prelude.rs index 6529e11..b7fd5ad 100644 --- a/src/guihandler/prelude.rs +++ b/src/guihandler/prelude.rs @@ -2,7 +2,7 @@ pub use super::gui::{ clickable::Clickable, colorable::Colorable, - displayable::Displayable, + displayable::{Displayable, DisplayableFillType}, executable::Executable, framable::*, hoverable::Hoverable,