git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commitd07471c4225ff3d021004b87977dfe63ac307869
parent73728a949d
authorLucas Galante <[email protected]>
date2026-07-05 10:37
feat: implement preferred_height for Ramp widget to allocate space for dropdowns

 src/widget/input/ramp.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/widget/input/ramp.rs b/src/widget/input/ramp.rs
index 4d335d4..533fa10 100644
--- a/src/widget/input/ramp.rs
+++ b/src/widget/input/ramp.rs
@@ -630,6 +630,10 @@ impl Element for Ramp {
         colors::ramp_background_color()
     }
     
+    fn preferred_height(&self) -> Option<f32> {
+        Some(150.0)
+    }
+    
     fn set_rect(&mut self, x: f32, y: f32, w: f32, h: f32) {
         self.base.x = x;
         self.base.y = y;