git.lucas.co / cce-color-editor
color picker and palette editor
git clone https://git.lucas.co/cce-color-editor.git

commit2d8f1d904400de38a8890ea94ed5f9557a4523cf
parent47e281c2d9
authorLucas Galante <[email protected]>
date2026-06-09 10:08
Refactor and adapt widgets to use UiContext and scale factor

 Cargo.toml  | 2 +-
 Makefile    | 2 +-
 src/main.rs | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 63fd9e9..95e31a4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
 [package]
-name = "clear-color-interface"
+name = "cce-color-interface"
 version = "0.1.0"
 edition = "2021"
 
diff --git a/Makefile b/Makefile
index ff106cb..8ac1263 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ build:
 
 install: build
 	mkdir -p ~/.local/bin
-	install -m 755 target/release/clear-color-interface ~/.local/bin/clear-color-interface
+	install -m 755 target/release/cce-color-interface ~/.local/bin/cce-color-interface
 
 run:
 	cargo run
diff --git a/src/main.rs b/src/main.rs
index 84beb9d..2908c23 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -259,7 +259,7 @@ impl ColorApp {
         surface.set_buffer_scale(scale as i32);
         let window = xdg_shell_state.create_window(surface.clone(), WindowDecorations::None, qh);
         window.set_title("Clear Color Interface");
-        window.set_app_id("clear-color-interface");
+        window.set_app_id("cce-color-interface");
         window.set_min_size(Some((WIN_W as u32, WIN_H as u32)));
         window.commit();
 
@@ -618,7 +618,7 @@ impl ColorApp {
         let bounds = TextBounds { left: 0, top: 0, right: w as i32, bottom: h as i32 };
         let areas: Vec<TextArea> = text_items.iter().map(|ti| TextArea {
             buffer: &ti.buffer,
-            left: ti.x, top: ti.y, scale: 1.0, bounds,
+            left: ti.x.round(), top: ti.y.round(), scale: 1.0, bounds,
             default_color: ti.color,
             custom_glyphs: &[],
         }).collect();