debugging several things:
Some checks are pending
/ test (push) Waiting to run

Performance: text_svg still isn't that great neither is video
DnD: The cosmic DND solution still doesn't work consistently, so I
will likely code my own trick.
This commit is contained in:
Chris Cochrun 2025-08-19 14:18:06 -05:00
parent 79eff08add
commit 0c51e7a724
7 changed files with 136 additions and 20 deletions

View file

@ -47,13 +47,12 @@ impl TryFrom<(Vec<u8>, String)> for ServiceItem {
fn try_from(
value: (Vec<u8>, String),
) -> std::result::Result<Self, Self::Error> {
let sto = value.0.to_owned();
let song = Song {
title: "Death Was Arrested".to_string(),
..Default::default()
};
debug!(?value);
Ok(Self::from(&song))
let val = Value::from(
String::from_utf8(value.0)
.expect("Value couldn't be made"),
);
Ok(Self::from(&val))
}
}

View file

@ -321,6 +321,10 @@ impl Slide {
self.id = index;
}
pub(crate) fn text_to_image(&self) {
todo!()
}
// pub fn slides_from_item(item: &ServiceItem) -> Result<Vec<Self>> {
// todo!()
// }

View file

@ -312,6 +312,21 @@ impl cosmic::Application for App {
} else {
cosmic::Action::None
}
}).on_drop(|index, idk| {
debug!(index, idk);
cosmic::Action::None
}).on_data_received( move |mime, data| {
debug!(?data, mime);
let Ok(item) = ServiceItem::try_from((data.clone(), mime.clone())) else {
return cosmic::Action::None;
};
cosmic::Action::App(Message::AddServiceItem(index, item))
}).on_finish(move |mime, data, action, x, y| {
debug!(mime, ?data, ?action, x, y);
let Ok(item) = ServiceItem::try_from((data.clone(), mime.clone())) else {
return cosmic::Action::None;
};
cosmic::Action::App(Message::AddServiceItem(index, item))
})
.into()
});

View file

@ -333,10 +333,10 @@ impl Presenter {
}
}
Message::VideoFrame => {
// if let Some(video) = &self.video {
// self.video_position =
// video.position().as_secs_f32();
// }
if let Some(video) = &self.video {
self.video_position =
video.position().as_secs_f32();
}
}
Message::MissingPlugin(element) => {
if let Some(video) = &mut self.video {