dash-frontend: fix more colors, wgui: fix possible flicker

This commit is contained in:
Aleksander 2026-07-12 20:23:32 +02:00
parent 2ea3b222f3
commit c32e3ef86e
4 changed files with 8 additions and 3 deletions

View File

@ -8,7 +8,7 @@
flex_direction="column" overflow="visible" align_items="center" justify_content="center" gap="4" flex_direction="column" overflow="visible" align_items="center" justify_content="center" gap="4"
> >
<div> <div>
<sprite src="${src}" src_ext="${src_ext}" width="64" height="64" /> <sprite src="${src}" src_ext="${src_ext}" width="64" height="64" color="#FFFFFF" />
</div> </div>
<div align_items="center" justify_content="center"> <div align_items="center" justify_content="center">
<label width="116" weight="bold" text="${name}" size="12" wrap="1" align="center" padding_left="16" padding_right="16" /> <label width="116" weight="bold" text="${name}" size="12" wrap="1" align="center" padding_left="16" padding_right="16" />

View File

@ -11,7 +11,7 @@
<label id="label_description" wrap="1" text="No description available" /> <label id="label_description" wrap="1" text="No description available" />
<Button id="btn_launch" align_self="baseline" color="#44ce22ff" border_color="#44ce22ff" padding_top="4" padding_bottom="4" round="8" padding_right="12" min_width="200" min_height="40"> <Button id="btn_launch" align_self="baseline" color="#44ce22ff" border_color="#44ce22ff" padding_top="4" padding_bottom="4" round="8" padding_right="12" min_width="200" min_height="40">
<sprite src_builtin="dashboard/play.svg" width="32" height="32" /> <sprite src_builtin="dashboard/play.svg" width="32" height="32" />
<label text="Launch" weight="bold" size="17" shadow="#00000099" /> <label text="Launch" weight="bold" size="17" color="#FFFFFF" shadow="#00000099" />
</Button> </Button>
</div> </div>
</div> </div>

View File

@ -107,10 +107,14 @@ impl View {
content: Translation::from_raw_text(text), content: Translation::from_raw_text(text),
style: TextStyle { style: TextStyle {
weight: Some(FontWeight::Bold), weight: Some(FontWeight::Bold),
color: Some(drawing::Color::new(1.0, 1.0, 1.0, 1.0).into()),
wrap: true, wrap: true,
size: Some(16.0), size: Some(16.0),
align: Some(HorizontalAlign::Center), align: Some(HorizontalAlign::Center),
shadow: Some(WguiTextShadow::default()), shadow: Some(WguiTextShadow {
color: drawing::Color::new(0.0, 0.0, 0.0, 1.0).into(),
..Default::default()
}),
..Default::default() ..Default::default()
}, },
..Default::default() ..Default::default()

View File

@ -711,6 +711,7 @@ impl Layout {
.process(&self.state, &mut self.alterables, params.timestep_alpha); .process(&self.state, &mut self.alterables, params.timestep_alpha);
self.process_alterables(alterables)?; self.process_alterables(alterables)?;
self.try_recompute_layout(params.size)?; self.try_recompute_layout(params.size)?;
self.process_pending_components();
Ok(LayoutUpdateResult { Ok(LayoutUpdateResult {
sounds_to_play: std::mem::take(&mut self.sounds_to_play_once), sounds_to_play: std::mem::take(&mut self.sounds_to_play_once),