diff --git a/src/ui/slide_editor.rs b/src/ui/slide_editor.rs index 018e936..fb12342 100644 --- a/src/ui/slide_editor.rs +++ b/src/ui/slide_editor.rs @@ -1,7 +1,7 @@ use std::{io, path::PathBuf}; use cosmic::{ - iced::{Color, Font, Length, Size}, + iced::{Color, Font, Length}, prelude::*, widget::{ self, @@ -50,9 +50,7 @@ pub enum SlideError { } #[derive(Debug, Default)] -struct EditorProgram { - mouse_button_pressed: Option, -} +struct EditorProgram {} impl SlideEditor { pub fn view<'a>( @@ -85,14 +83,9 @@ impl<'a> Program ) -> Vec> { // We prepare a new `Frame` let mut frame = canvas::Frame::new(renderer, bounds.size()); - let frame_rect = bounds.shrink(10); // We create a `Path` representing a simple circle let circle = canvas::Path::circle(frame.center(), 50.0); - let border = canvas::Path::rectangle( - cosmic::iced::Point { x: 10.0, y: 10.0 }, - Size::new(frame_rect.width, frame_rect.height), - ); // And fill it with some color frame.fill(&circle, Color::BLACK); @@ -102,12 +95,6 @@ impl<'a> Program .with_width(5.0) .with_color(Color::BLACK), ); - frame.stroke( - &border, - Stroke::default() - .with_width(5.0) - .with_color(Color::BLACK), - ); // Then, we produce the geometry vec![frame.into_geometry()] @@ -117,7 +104,7 @@ impl<'a> Program &self, _state: &mut Self::State, event: canvas::Event, - bounds: cosmic::iced::Rectangle, + _bounds: cosmic::iced::Rectangle, _cursor: cosmic::iced_core::mouse::Cursor, ) -> (canvas::event::Status, Option) { match event { @@ -130,17 +117,8 @@ impl<'a> Program } cosmic::iced::mouse::Event::CursorMoved { position, - } => { - if bounds.x < position.x - && bounds.y < position.y - && (bounds.width + bounds.x) > position.x - && (bounds.height + bounds.y) > position.y - { - debug!(?position, "cursor moved"); - } - } + } => debug!(?position, "cursor moved"), cosmic::iced::mouse::Event::ButtonPressed(button) => { - // self.mouse_button_pressed = Some(button); debug!(?button, "mouse button pressed") } cosmic::iced::mouse::Event::ButtonReleased( diff --git a/todo.org b/todo.org index 005086d..0a8457a 100644 --- a/todo.org +++ b/todo.org @@ -1,13 +1,6 @@ #+TITLE: The Task list for Lumina -* TODO [#A] Develop DnD for library items -This is limited by the fact that I need to develop this in cosmic. I am honestly thinking that I'll need to build my own drag and drop system or at least work with system76 to fix their dnd system on other systems. - -This needs lots more attention - -* TODO [#A] Need to fix tests now that the basic app is working - * TODO Check into =mupdf-rs= for loading PDF's. * TODO [#A] Text could be built by using SVG instead of the text element. Maybe I could construct my own text element even This does almost work. There is a clear amount of lag or rather hang up since switching to the =text_svg= element. I think I may only keep it till I can figure out how to do strokes and shadows in iced's normal text element. @@ -19,9 +12,14 @@ Since SVG's apparently run poorly in iced, instead I'll need to see about either * TODO [#C] Make the presenter more modular so things are easier to change. +* TODO [#A] Need to fix tests now that the basic app is working + * TODO Build library to see all available songs, images, videos, presentations, and slides ** DONE Develop ui for libraries I've got the library basic layer done, I need to develop a way to open the libraries accordion button and then show the list of items in the library +** TODO [#A] Develop DnD for library items +This is limited by the fact that I need to develop this in cosmic. I am honestly thinking that I'll need to build my own drag and drop system or at least work with system76 to fix their dnd system on other systems. + * TODO [#B] Build editors for each possible item ** TODO Develop ui for editors