git.lucas.co / cce-text-editor
text editor
git clone https://git.lucas.co/cce-text-editor.git

commit76b9e877306db15131743fb561b291f1b8c7ca6b
parent7cae22ac58
authorLucas Galante <[email protected]>
date2026-06-18 01:22
refactor: update dependencies and rename clear-ui to cce-ui

 Cargo.toml  |  2 +-
 src/main.rs | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 0a0202d..e8954fb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
 edition = "2021"
 
 [dependencies]
-clear-ui = { path = "../clear-ui" }
+cce-ui = { path = "../cce-ui" }
 smithay-client-toolkit = "0.19.2"
 calloop = "0.13.0"
 calloop-wayland-source = "0.3.0"
diff --git a/src/main.rs b/src/main.rs
index e264d31..9c1be1a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,7 +1,7 @@
 use wayland_client::QueueHandle;
 use glyphon::{FontSystem, Buffer, Metrics, Attrs};
-use clear_ui::engine::{Application, EngineState, LogicalPosition, LogicalSize, WindowSettings};
-use clear_ui::widget::{
+use cce_ui::engine::{Application, EngineState, LogicalPosition, LogicalSize, WindowSettings};
+use cce_ui::widget::{
     MouseButton, ElementState, MouseScrollDelta, KeyEvent, TextItem, Element,
     TextBox, Button, TextLabel, Key
 };
@@ -36,7 +36,7 @@ struct TextEditorApp {
     text_items: Vec<TextItem>,
     font_system: FontSystem,
     needs_rebuild: bool,
-    ui_context: clear_ui::context::UiContext,
+    ui_context: cce_ui::context::UiContext,
     ctrl_pressed: bool,
     initial_focus: bool,
     status_message: Option<(String, bool)>,
@@ -112,7 +112,7 @@ impl TextEditorApp {
     fn rebuild_text_items(&mut self) {
         self.editor.prepare_text(&mut self.font_system);
         self.text_items.clear();
-        let scale = clear_ui::scale::scale_factor();
+        let scale = cce_ui::scale::scale_factor();
         let mut labels = Vec::new();
 
         // 1. Button labels
@@ -152,7 +152,7 @@ impl TextEditorApp {
             let metrics = Metrics::new(physical_size, physical_size * 1.4);
             let mut buf = Buffer::new(&mut self.font_system, metrics);
             let family_val = match font_family.as_str() {
-                "monospace" => glyphon::Family::Name(clear_ui::layout::get_system_monospace_font()),
+                "monospace" => glyphon::Family::Name(cce_ui::layout::get_system_monospace_font()),
                 "sans-serif" => glyphon::Family::SansSerif,
                 "serif" => glyphon::Family::Serif,
                 _ => glyphon::Family::Name(&font_family),
@@ -272,7 +272,7 @@ impl Application for TextEditorApp {
                 fs
             },
             needs_rebuild: true,
-            ui_context: clear_ui::context::UiContext::new(),
+            ui_context: cce_ui::context::UiContext::new(),
             ctrl_pressed: false,
             initial_focus: true,
             status_message: None,
@@ -583,5 +583,5 @@ fn main() {
     let rt = tokio::runtime::Runtime::new().expect("tokio runtime");
     let _guard = rt.enter();
     
-    clear_ui::engine::run::<TextEditorApp>();
+    cce_ui::engine::run::<TextEditorApp>();
 }