add fuit background

This commit is contained in:
2025-11-21 03:00:31 -05:00
parent ce07c80782
commit 6eac4f4576
2 changed files with 7 additions and 2 deletions

View File

@@ -30,8 +30,13 @@ pub fn main_view(client: &mut Client, network: NetSender) -> WidgetId {
let msg_panel = msg_panel(client, network);
let side_bar = rect(Color::BLACK.brighter(0.05)).width(80);
let bg = (
image(include_bytes!("./assets/fuit.jpg")),
rect(Color::BLACK.alpha((0.8 * 255.0) as u8)),
).stack();
(side_bar, msg_panel)
.span(Dir::RIGHT)
.background(bg)
.add(&mut client.ui)
.any()
}
@@ -145,7 +150,7 @@ pub fn focus_other(id: WidgetId<TextEdit>) -> impl Fn(&mut Client, CursorData) {
}
}
pub fn msg_panel(client: &mut Client, network: NetSender) -> impl WidgetFn<Stack> + use<> {
pub fn msg_panel(client: &mut Client, network: NetSender) -> impl WidgetFn<Sized> + use<> {
let Client { ui, channel, .. } = client;
let msg_area = Span::empty(Dir::DOWN).gap(15).add(ui);
*channel = Some(msg_area.clone());
@@ -186,5 +191,5 @@ pub fn msg_panel(client: &mut Client, network: NetSender) -> impl WidgetFn<Stack
)
.span(Dir::DOWN)
.width(rest(1))
.background(rect(Color::BLACK.brighter(0.1)))
// .background(rect(Color::BLACK.brighter(0.1)))
}