color picker and palette editor
git clone https://git.lucas.co/cce-color-editor.git
refactor: build the app with Application::create
Application::new(qh, sender) took the session's Wayland queue handle,
which no client ever used, and calloop's sender; cce-ui is retiring it
for create(sender: AppSender<_>), which names no window system. The
body is unchanged: an app that keeps calloop's sender converts the
AppSender into it on the first line, and the now-unused QueueHandle and
EngineState imports go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/main.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 5b5a4fe..ccc6678 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,5 @@
use cce_ui::widget::Owned;
-use cce_ui::engine::{Application, WindowSettings, LogicalSize, LogicalPosition, EngineState};
+use cce_ui::engine::{Application, WindowSettings, LogicalSize, LogicalPosition};
use cce_ui::widget::{
Adapted, Button, WidgetHost, EventCtx, UiContext, MouseButton, ElementState, KeyEvent,
MouseScrollDelta, Event,
@@ -7,7 +7,6 @@ use cce_ui::widget::{
use cce_ui::layout::RenderTarget;
use cce_ui::scene::layout::{Rect, Size};
use cce_ui::scene::paint::PaintCtx;
-use wayland_client::QueueHandle;
use std::io::IsTerminal;
@@ -681,7 +680,7 @@ impl Application for ColorApp {
Some(&self.ui_context)
}
- fn new(_qh: &QueueHandle<EngineState<Self>>, _sender: calloop::channel::Sender<Self::Message>) -> Self {
+ fn create(_sender: cce_ui::engine::AppSender<Self::Message>) -> Self {
let args: Vec<String> = std::env::args().collect();
let mut with_alpha = false;
let mut stream = false;