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

commit4453727552a668bdada3509d2f8f889c16c8a971
parent843f205b1c
authorLucas Galante <[email protected]>
date2026-07-05 13:49
fix: dynamically query parent widget color for exact background blending

 src/widget/input/dropdown.rs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/widget/input/dropdown.rs b/src/widget/input/dropdown.rs
index 38acafc..712af69 100644
--- a/src/widget/input/dropdown.rs
+++ b/src/widget/input/dropdown.rs
@@ -528,7 +528,12 @@ impl Element for Dropdown {
         let text_y = crate::layout::align_text_y(self.base.y, self.base.h, 12.0, top);
         let default_color = [0xdd, 0xdd, 0xe2];
         let bg_color = colors::dropdown_background_color();
-        let parent_color = colors::control_panel_color();
+        let mut parent_color = colors::page_color();
+        if let Some(parent_ptr) = self.parent {
+            unsafe {
+                parent_color = (*parent_ptr).color();
+            }
+        }
         let alpha = bg_color[3];
         let bg_rgb = [
             ((parent_color[0] * (1.0 - alpha) + bg_color[0] * alpha) * 255.0).round().clamp(0.0, 255.0) as u8,