fix srgb in uidev mode, tweak colors a bit

[skip ci]
This commit is contained in:
Aleksander
2025-12-26 20:58:17 +01:00
parent a44aa2e426
commit d8625f770c
9 changed files with 24 additions and 34 deletions

View File

@@ -15,6 +15,7 @@
height="~side_button_size"
color="#44444400"
hover_color="#333333ff"
border_color="#00000000"
hover_border_color="#555555ff"
tooltip="${tooltip}"
tooltip_side="${tooltip_side}"
@@ -24,11 +25,8 @@
</template>
<elements>
<!-- background for testing -->
<!-- <rectangle position="absolute" color="#333333" width="100%" height="100%" /> -->
<!-- left/right separator (menu and rest) -->
<div flex_direction="row" gap="8" width="100%" height="100%">
<div flex_direction="row" gap="8" width="100%" height="100%" padding="4" interactable="0">
<!-- LEFT MENU -->
<div id="menu"
width="~size_size"
@@ -69,7 +67,7 @@
<rectangle
id="rect_content"
color2="#0d131a00"
color="#24417900"
color="#252f5300"
gradient="vertical"
round="8"
flex_grow="1"
@@ -79,7 +77,7 @@
<!-- radial gradient -->
<rectangle
position="absolute" width="100%" height="100%"
gradient="radial" color="#44BBFF22" color2="#00000000" />
gradient="radial" color="#44BBFF11" color2="#00000000" />
<div
id="content"
@@ -124,7 +122,7 @@
<!-- top shine -->
<div position="absolute" width="100%" height="100%" justify_content="center">
<rectangle position="absolute" width="99%" height="2" color="#FFFFFF66" round="4" />
<rectangle position="absolute" width="99%" height="2" color="#FFFFFF22" round="4" />
</div>
<!-- Left bottom side -->

View File

@@ -19,7 +19,7 @@
>
<!-- Shine effect at the top -->
<rectangle position="absolute" width="100%" height="2" round="4" color="#ffffff55" />
<rectangle position="absolute" width="100%" height="2" round="4" color="#ffffff22" />
<!-- Top bar contents -->
<div gap="16" align_items="center">
@@ -35,8 +35,8 @@
<!-- Content -->
<rectangle height="100%"
color="#010310ee"
color2="#062a5eee"
color="#010310fe"
color2="#051c55fc"
gradient="vertical"
padding="16"
id="content">

View File

@@ -116,14 +116,6 @@ impl TabSettings {
None,
)?;
init_setting_checkbox(
frontend,
&tasks,
state.data.fetch_component_as::<ComponentCheckbox>("cb_am_pm_clock")?,
SettingType::DashAmPmClock,
Some(FrontendTask::RefreshClock),
)?;
init_setting_checkbox(
frontend,
&tasks,

View File

@@ -125,7 +125,7 @@ pub struct Games {
manifests: Vec<steam_utils::AppManifest>,
}
const BORDER_COLOR_DEFAULT: drawing::Color = drawing::Color::new(1.0, 1.0, 1.0, 0.3);
const BORDER_COLOR_DEFAULT: drawing::Color = drawing::Color::new(0.0, 0.0, 0.0, 0.35);
const BORDER_COLOR_HOVERED: drawing::Color = drawing::Color::new(1.0, 1.0, 1.0, 1.0);
const GAME_COVER_SIZE_X: f32 = 140.0;
@@ -153,7 +153,7 @@ fn construct_game_cover(
let (widget_button, button) = components::button::construct(
ess,
components::button::Params {
color: Some(drawing::Color::new(1.0, 1.0, 1.0, 0.1)),
color: Some(drawing::Color::new(1.0, 1.0, 1.0, 0.0)),
border_color: Some(BORDER_COLOR_DEFAULT),
hover_border_color: Some(BORDER_COLOR_HOVERED),
round: WLength::Units(12.0),
@@ -216,8 +216,8 @@ fn construct_game_cover(
let (top_shine, _) = ess.layout.add_child(
widget_button.id,
rect_gradient(
drawing::Color::new(1.0, 1.0, 1.0, 0.25),
drawing::Color::new(1.0, 1.0, 1.0, 0.0),
drawing::Color::new(1.0, 1.0, 1.0, 0.2),
drawing::Color::new(1.0, 1.0, 1.0, 0.02),
),
rect_gradient_style(taffy::AlignSelf::Baseline, 0.05),
)?;
@@ -229,7 +229,7 @@ fn construct_game_cover(
ess.layout.add_child(
widget_button.id,
rect_gradient(
drawing::Color::new(1.0, 1.0, 1.0, 0.2),
drawing::Color::new(1.0, 1.0, 1.0, 0.15),
drawing::Color::new(1.0, 1.0, 1.0, 0.0),
),
rect_gradient_style(taffy::AlignSelf::Baseline, 0.5),
@@ -249,10 +249,10 @@ fn construct_game_cover(
ess.layout.add_child(
widget_button.id,
rect_gradient(
drawing::Color::new(0.0, 0.0, 0.0, 0.0),
drawing::Color::new(0.0, 0.0, 0.0, 0.5),
drawing::Color::new(0.0, 0.0, 0.0, 0.1),
drawing::Color::new(0.0, 0.0, 0.0, 0.9),
),
rect_gradient_style(taffy::AlignSelf::End, 0.1),
rect_gradient_style(taffy::AlignSelf::End, 0.05),
)?;
// request cover image data from the internet or disk cache
@@ -376,7 +376,7 @@ impl View {
fn mount_image(layout: &mut Layout, cell: &Cell, glyph: &CustomGlyphData) -> anyhow::Result<()> {
let image = WidgetImage::create(WidgetImageParams {
round: WLength::Units(12.0),
round: WLength::Units(10.0),
glyph_data: Some(glyph.clone()),
..Default::default()
});
@@ -413,7 +413,7 @@ impl View {
size: Some(16.0),
align: Some(HorizontalAlign::Center),
shadow: Some(TextShadow {
color: drawing::Color::new(0.0, 0.0, 0.0, 0.5),
color: drawing::Color::new(0.0, 0.0, 0.0, 1.0),
x: 2.0,
y: 2.0,
}),