Compare commits
No commits in common. "1cd34f5019dc6f307a00659ec28234ef4a01f95e" and "7f8381fb839313d145119b2bf24a448b0a87bd07" have entirely different histories.
1cd34f5019
...
7f8381fb83
4 changed files with 8 additions and 94 deletions
|
|
@ -955,13 +955,11 @@ impl cosmic::Application for App {
|
|||
let slide_index = self.current_item.1;
|
||||
let item_index = self.current_item.0;
|
||||
let mut tasks = vec![];
|
||||
debug!(slide_index, item_index);
|
||||
if let Some(item) =
|
||||
self.service.get(item_index)
|
||||
{
|
||||
if item.slides.len() > slide_index + 1 {
|
||||
let slide_index = slide_index + 1;
|
||||
debug!(slide_index, item_index);
|
||||
let action = self.presenter.update(
|
||||
presenter::Message::ActivateSlide(
|
||||
item_index,
|
||||
|
|
@ -978,7 +976,7 @@ impl cosmic::Application for App {
|
|||
}));
|
||||
}
|
||||
self.current_item =
|
||||
(item_index, slide_index);
|
||||
(item_index, slide_index + 1);
|
||||
Task::batch(tasks)
|
||||
} else {
|
||||
// debug!("Slides are not longer");
|
||||
|
|
@ -1032,7 +1030,7 @@ impl cosmic::Application for App {
|
|||
}));
|
||||
}
|
||||
self.current_item =
|
||||
(item_index, slide_index);
|
||||
(item_index, slide_index - 1);
|
||||
Task::batch(tasks)
|
||||
} else if slide_index == 0
|
||||
&& item_index == 0
|
||||
|
|
|
|||
|
|
@ -216,7 +216,6 @@ impl Presenter {
|
|||
// ));
|
||||
}
|
||||
Message::ActivateSlide(item_index, slide_index) => {
|
||||
debug!(slide_index, item_index);
|
||||
if let Some(slide) = self
|
||||
.service
|
||||
.get(item_index)
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@ use tracing::{debug, error};
|
|||
|
||||
use crate::{
|
||||
Background, BackgroundKind,
|
||||
core::{
|
||||
service_items::ServiceTrait,
|
||||
slide::Slide,
|
||||
songs::{Song, Verse},
|
||||
},
|
||||
core::{service_items::ServiceTrait, slide::Slide, songs::Song},
|
||||
ui::{
|
||||
presenter::slide_view, slide_editor::SlideEditor, text_svg,
|
||||
},
|
||||
|
|
@ -420,86 +416,7 @@ order",
|
|||
]
|
||||
.spacing(5);
|
||||
|
||||
let verse_list = self.song.clone().map(|song| {
|
||||
if let Some(verses) = song.verses.map(|verses| {
|
||||
verses
|
||||
.iter()
|
||||
.map(|verse| match verse {
|
||||
Verse::Verse { number, .. } => text({
|
||||
let mut string = "Verse ".to_string();
|
||||
string.push_str(&number.to_string());
|
||||
string
|
||||
}),
|
||||
Verse::PreChorus { number, lyric } => text({
|
||||
let mut string =
|
||||
"Pre-Chorus ".to_string();
|
||||
string.push_str(&number.to_string());
|
||||
string
|
||||
}),
|
||||
Verse::Chorus { number, lyric } => text({
|
||||
let mut string = "Chorus ".to_string();
|
||||
string.push_str(&number.to_string());
|
||||
string
|
||||
}),
|
||||
Verse::PostChorus { number, lyric } => {
|
||||
text({
|
||||
let mut string =
|
||||
"Post-Chorus ".to_string();
|
||||
string.push_str(&number.to_string());
|
||||
string
|
||||
})
|
||||
}
|
||||
Verse::Bridge { number, lyric } => text({
|
||||
let mut string = "Bridge ".to_string();
|
||||
string.push_str(&number.to_string());
|
||||
string
|
||||
}),
|
||||
Verse::Intro { number, lyric } => text({
|
||||
let mut string = "Intro ".to_string();
|
||||
string.push_str(&number.to_string());
|
||||
string
|
||||
}),
|
||||
Verse::Outro { number, lyric } => text({
|
||||
let mut string = "Outro ".to_string();
|
||||
string.push_str(&number.to_string());
|
||||
string
|
||||
}),
|
||||
Verse::Instrumental { number, lyric } => {
|
||||
text({
|
||||
let mut string =
|
||||
"Instrumental ".to_string();
|
||||
string.push_str(&number.to_string());
|
||||
string
|
||||
})
|
||||
}
|
||||
Verse::Other { number, lyric } => text({
|
||||
let mut string = "Other ".to_string();
|
||||
string.push_str(&number.to_string());
|
||||
string
|
||||
}),
|
||||
})
|
||||
.collect()
|
||||
}) {
|
||||
verses
|
||||
} else {
|
||||
vec![]
|
||||
}
|
||||
});
|
||||
let verse_list = if let Some(verse_list) = verse_list {
|
||||
Element::from(row(verse_list
|
||||
.into_iter()
|
||||
.map(|v| Element::from(v))))
|
||||
} else {
|
||||
Element::from(horizontal_space())
|
||||
};
|
||||
|
||||
column![
|
||||
title_input,
|
||||
author_input,
|
||||
verse_input,
|
||||
lyric_input,
|
||||
verse_list
|
||||
]
|
||||
column![title_input, author_input, verse_input, lyric_input,]
|
||||
.spacing(25)
|
||||
.width(Length::FillPortion(2))
|
||||
.into()
|
||||
|
|
|
|||
2
todo.org
2
todo.org
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
|
||||
* TODO [#A] Need to fix tests now that the basic app is working
|
||||
* TODO [#A] Allow for a way to split the presentation up with a right click menu for the presentation preview row.
|
||||
* TODO [#A] Allow for a way to split the presentation up but a right click menu for the presentation.
|
||||
* 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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue