Use Color in View

This commit is contained in:
Joscha 2024-03-05 00:21:48 +01:00
parent 097f4ee548
commit f3f8af39d4
2 changed files with 6 additions and 4 deletions

View file

@ -1,4 +1,4 @@
use crate::{BoxedWidget, Vec2, Widget};
use crate::{BoxedWidget, Color, Vec2, Widget};
pub struct Background<C> {
inner: BoxedWidget<C>,
@ -11,7 +11,7 @@ impl<C> Background<C> {
}
}
impl<C: Copy> Widget<C> for Background<C> {
impl<C: Color> Widget<C> for Background<C> {
fn size(&self, max_width: Option<i32>, max_height: Option<i32>) -> crate::Vec2 {
self.inner.size(max_width, max_height)
}