GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
feat: Spreadsheet pane wears the parameter plate's fill and bevel
The pane's plate was a flat PARAM_BG const with a hardcoded 12.0 corner
radius — it ignored the plate corner radius, never beveled, and didn't
track a live retint. It now draws from param_plate_fill() (tint, opacity,
and blur-behind marker) with the shared plate corner radius and border, so
the host promotes it to the plate bevel under control_relief exactly like
ParametersBg.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/widget/container/spreadsheet.rs | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/widget/container/spreadsheet.rs b/src/widget/container/spreadsheet.rs
index e7f9b37..19ec45f 100644
--- a/src/widget/container/spreadsheet.rs
+++ b/src/widget/container/spreadsheet.rs
@@ -104,13 +104,26 @@ impl Spreadsheet {
impl Layout for Spreadsheet {}
impl Paint for Spreadsheet {
+ /// The pane IS its own background plate, wearing the parameter plate's fill —
+ /// same tint, opacity, and blur-behind marker (`param_plate_fill`) — so it
+ /// bevels like the params plate and tracks a live retint / opacity / blur
+ /// toggle with it.
fn color(&self) -> [f32; 4] {
- colors::PARAM_BG
+ colors::param_plate_fill()
}
+ /// The shared plate corner radius (rounded on all four corners when non-zero),
+ /// matching the rounded clip hosts carve for the pane's content.
fn corner_style(&self, _rect: Rect) -> Option<(f32, (bool, bool, bool, bool))> {
- // Legacy: rounded_corners override (all corners) with the WidgetHost-default 12.0 radius.
- Some((12.0, (true, true, true, true)))
+ let r = crate::layout::plate_corner_radius();
+ let on = r > 0.0;
+ Some((r, (on, on, on, on)))
+ }
+
+ /// The shared plate border — under `control_relief` the host promotes this to
+ /// the plate bevel, like `ParametersBg`.
+ fn solid_border(&self) -> Option<([f32; 4], f32)> {
+ colors::plate_border_color().map(|bc| (bc, colors::plate_border_thickness()))
}
fn paint(&self, rect: Rect, ctx: &mut PaintCtx) {