GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
Rename style.surfaces keys to style.surface
src/color.rs | 6 +++---
src/layout.rs | 26 +++++++++++++-------------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/color.rs b/src/color.rs
index c2293db..d1e7798 100644
--- a/src/color.rs
+++ b/src/color.rs
@@ -159,13 +159,13 @@ fn parse_and_set_colors(content: &str) {
}
}
- if let Some(radius) = val.pointer("/style/surfaces/backplate/corner_radius").and_then(|v| v.as_f64()) {
+ if let Some(radius) = val.pointer("/style/surface/backplate/corner_radius").and_then(|v| v.as_f64()) {
if let Ok(mut lock) = BACKPLATE_CORNER_RADIUS.write() {
*lock = radius as f32;
}
- }
+ }
- if let Some(c) = get_color("/style/surfaces/backplate/color") {
+ if let Some(c) = get_color("/style/surface/backplate/color") {
if let Ok(mut lock) = PAGE_LOW_COLOR.write() { *lock = c; }
if let Ok(mut lock) = BACKPLATE_OPACITY.write() { *lock = Some(c[3]); }
}
diff --git a/src/layout.rs b/src/layout.rs
index 8968c92..6e75220 100644
--- a/src/layout.rs
+++ b/src/layout.rs
@@ -61,19 +61,19 @@ fn flatten_json_to_flat_props(val: &serde_json::Value, prefix: &str, flat_props:
"style.overlay.position" => "overlay_position",
"style.overlay.border_gap" => "overlay_border_gap",
"style.editor.last_page" => "last_page",
- "style.surfaces.desktop.gap_color" => "desktop_gap_color",
- "style.surfaces.desktop.cell_color" => "desktop_cell_color",
- "style.surfaces.desktop.gap_width" => "desktop_gap_width",
- "style.surfaces.desktop.cell_corner_radius" => "desktop_cell_corner_radius",
- "style.surfaces.desktop.cell_fade_inset" => "desktop_cell_fade_inset",
- "style.surfaces.desktop.enable_solid_color" => "desktop_enable_solid_color",
- "style.surfaces.desktop.solid_color" => "desktop_solid_color",
- "style.surfaces.plate.padding" => "plate_padding",
- "style.surfaces.backplate.color" => "backplate_color",
- "style.surfaces.backplate.blur" => "backplate_blur",
- "style.surfaces.backplate.corner_radius" => "backplate_corner_radius",
- "style.surfaces.page.opacity" => "page_opacity",
- "style.surfaces.page.margin" => "page_margin",
+ "style.surface.desktop.gap_color" => "desktop_gap_color",
+ "style.surface.desktop.cell_color" => "desktop_cell_color",
+ "style.surface.desktop.gap_width" => "desktop_gap_width",
+ "style.surface.desktop.cell_corner_radius" => "desktop_cell_corner_radius",
+ "style.surface.desktop.cell_fade_inset" => "desktop_cell_fade_inset",
+ "style.surface.desktop.enable_solid_color" => "desktop_enable_solid_color",
+ "style.surface.desktop.solid_color" => "desktop_solid_color",
+ "style.surface.plate.padding" => "plate_padding",
+ "style.surface.backplate.color" => "backplate_color",
+ "style.surface.backplate.blur" => "backplate_blur",
+ "style.surface.backplate.corner_radius" => "backplate_corner_radius",
+ "style.surface.page.opacity" => "page_opacity",
+ "style.surface.page.margin" => "page_margin",
other => {
if let Some(rest) = other.strip_prefix("layout.") {