graphs
This commit is contained in:
@ -4,12 +4,15 @@ use buoyant::view::ZStack;
|
||||
use buoyant::view::shape::Rectangle;
|
||||
use embedded_graphics::pixelcolor::Rgb565;
|
||||
|
||||
use crate::BACKGROUND_COLOR;
|
||||
use crate::get_image;
|
||||
use crate::images::StaticImage;
|
||||
|
||||
pub fn icon_box_view(box_color: Rgb565, icon: &'static StaticImage) -> impl View<Rgb565> {
|
||||
ZStack::new((
|
||||
Rectangle.corner_radius(10).foreground_color(box_color),
|
||||
Rectangle
|
||||
.corner_radius(10)
|
||||
.foreground_color(BACKGROUND_COLOR),
|
||||
buoyant::view::Image::new(get_image!(icon)),
|
||||
))
|
||||
.flex_frame()
|
||||
|
||||
Reference in New Issue
Block a user