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

commitaf30093e47686fbf5da0453827698f0c41c302ec
parent7c1f6b0ca4
authorLucas Galante <[email protected]>
date2026-07-05 13:57
fix: make dropdown background opaque to prevent subpixel anti-aliasing artifacts on transparent surfaces

 src/widget/input/dropdown.rs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/widget/input/dropdown.rs b/src/widget/input/dropdown.rs
index 509d2d3..46f659c 100644
--- a/src/widget/input/dropdown.rs
+++ b/src/widget/input/dropdown.rs
@@ -292,7 +292,8 @@ impl Element for Dropdown {
             let visual_h = self.base.h - top;
             let radius = self.corner_radius();
             
-            let bg_color = colors::dropdown_background_color();
+            let mut bg_color = colors::dropdown_background_color();
+            bg_color[3] = 1.0; // Force opaque background to prevent subpixel blending artifacts
             let border_color = if self.open {
                 [0.30, 0.50, 0.32, 1.0]
             } else if self.base.hovered {
@@ -491,7 +492,8 @@ impl Element for Dropdown {
         let top = self.base.label_offset();
         let visual_h = self.base.h - top;
 
-        let bg_color = colors::dropdown_background_color();
+        let mut bg_color = colors::dropdown_background_color();
+        bg_color[3] = 1.0; // Force opaque background to prevent subpixel blending artifacts
         let border_color = if self.open {
             [0.30, 0.50, 0.32, 1.0]
         } else if self.base.hovered {