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

commit8a96e13abf9d9180f92d846f2206def2afe2add1
parentfac74a2d4b
authorLucas Galante <[email protected]>
date2026-06-29 19:08
Pass alpha flag to cce-colors when running with alpha, and set just_changed inside tick

 src/widget/input/color_selector.rs | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/widget/input/color_selector.rs b/src/widget/input/color_selector.rs
index c9fdcf8..e3666a3 100644
--- a/src/widget/input/color_selector.rs
+++ b/src/widget/input/color_selector.rs
@@ -214,11 +214,12 @@ impl Element for ColorSelector {
                 self.command.clone()
             };
 
-            if let Ok(child) = std::process::Command::new(&cmd_path)
-                .arg(&hex)
-                .stdout(std::process::Stdio::piped())
-                .spawn()
-            {
+            let mut cmd = std::process::Command::new(&cmd_path);
+            cmd.arg(&hex);
+            if self.with_alpha {
+                cmd.arg("--alpha");
+            }
+            if let Ok(child) = cmd.stdout(std::process::Stdio::piped()).spawn() {
                 *child_guard = Some(child);
             }
             return true;
@@ -244,6 +245,7 @@ impl Element for ColorSelector {
                                 self.color = [c[0], c[1], c[2]];
                                 self.alpha = if self.with_alpha { c[3] } else { 255 };
                                 self.just_clicked = true;
+                                self.just_changed = true;
                                 return true;
                             }
                         }