fix srgb in uidev mode, tweak colors a bit
[skip ci]
This commit is contained in:
@@ -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 -->
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
}),
|
||||
|
||||
@@ -118,7 +118,7 @@ pub fn init_window(
|
||||
device,
|
||||
queue_gfx,
|
||||
queue_xfer,
|
||||
vulkano::format::Format::B8G8R8A8_UNORM,
|
||||
vulkano::format::Format::R8G8B8A8_SRGB,
|
||||
);
|
||||
Ok((me, event_loop, window, surface))
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
round="16"
|
||||
border="2"
|
||||
border_color="#ffffff33"
|
||||
color="#081020ee"
|
||||
color="#080c20fa"
|
||||
padding="2">
|
||||
<!-- window title -->
|
||||
<div width="100%" height="32" align_items="center" position="relative" justify_content="end">
|
||||
|
||||
@@ -412,13 +412,13 @@ pub fn construct(ess: &mut ConstructEssentials, params: Params) -> anyhow::Resul
|
||||
let border_color = if let Some(border_color) = params.border_color {
|
||||
border_color
|
||||
} else {
|
||||
Color::new(color.r, color.g, color.b, color.a + 0.4)
|
||||
Color::new(color.r, color.g, color.b, color.a + 0.25)
|
||||
};
|
||||
|
||||
let hover_color = if let Some(hover_color) = params.hover_color {
|
||||
hover_color
|
||||
} else {
|
||||
Color::new(color.r + 0.25, color.g + 0.25, color.g + 0.25, color.a + 0.25)
|
||||
Color::new(color.r + 0.25, color.g + 0.25, color.g + 0.25, color.a + 0.15)
|
||||
};
|
||||
|
||||
let hover_border_color = if let Some(hover_border_color) = params.hover_border_color {
|
||||
|
||||
@@ -482,7 +482,7 @@ pub fn construct(ess: &mut ConstructEssentials, params: Params) -> anyhow::Resul
|
||||
WidgetLabelParams {
|
||||
content: Translation::default(),
|
||||
style: TextStyle {
|
||||
color: Some(drawing::Color::new(0.0, 0.0, 0.0, 0.75)), // always black
|
||||
color: Some(drawing::Color::new(0.0, 0.0, 0.0, 1.0)), // always black
|
||||
weight: Some(FontWeight::Bold),
|
||||
align: Some(HorizontalAlign::Center),
|
||||
..Default::default()
|
||||
|
||||
@@ -33,7 +33,7 @@ impl Default for Defaults {
|
||||
Self {
|
||||
dark_mode: true,
|
||||
text_color: drawing::Color::new(1.0, 1.0, 1.0, 1.0),
|
||||
button_color: drawing::Color::new(1.0, 1.0, 1.0, 0.05),
|
||||
button_color: drawing::Color::new(1.0, 1.0, 1.0, 0.02),
|
||||
accent_color: drawing::Color::new(0.13, 0.68, 1.0, 1.0),
|
||||
danger_color: drawing::Color::new(0.9, 0.0, 0.0, 1.0),
|
||||
faded_color: drawing::Color::new(0.67, 0.74, 0.80, 1.0),
|
||||
|
||||
Reference in New Issue
Block a user