diff --git a/Cargo.toml b/Cargo.toml index a252c9e..04801a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,5 +41,5 @@ version = "0.3.0" [dependencies.rodio] # Playing audio default-features = false -features = ["symphonia"] +features = ["symphonia-all"] path = "./rodio/" diff --git a/src/editor.rs b/src/editor.rs index 54ec467..5a985c0 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -67,12 +67,6 @@ impl Editor { pub fn handle_lyric_event(&mut self, line_no: usize, kind: LyricEvent) { self.lyrics.handle_event(line_no, kind) } - pub fn update_line(&mut self, new_content: String, line_no: usize) { - self.lyrics.update_line(new_content, line_no); - } - pub fn advance_line(&mut self, current_line: usize) { - self.lyrics.advance_line(current_line); - } pub fn current_line_mut(&mut self) -> (usize, &mut Lyric) { self.lyrics.current_line_mut() } diff --git a/src/file_select.rs b/src/file_select.rs index 0c5d06a..d58ca27 100644 --- a/src/file_select.rs +++ b/src/file_select.rs @@ -87,7 +87,6 @@ impl Program for FileSelector { x: bounds.x + bounds.width, y: bounds.y + bounds.height, }; - let screen_top_left = Point { x: bounds.x, y: bounds.y }; let mut frame = Frame::new(bounds.size()); @@ -104,13 +103,13 @@ impl Program for FileSelector { ((self.tick + offset_per_index * index) % MAX_TICKS) as f32 / MAX_TICKS as f32; - let top_left = interpolate(text_rect.0, screen_top_left, size); + let top_left = interpolate(text_rect.0, Point::ORIGIN, size); let far_corner = interpolate(text_rect_far_point, bound_far_point, size); let rect_size = Size::new(far_corner.x - top_left.x, far_corner.y - top_left.y); - (Path::rectangle(top_left, rect_size), color, size) + (Path::rectangle(top_left, rect_size), color) }) - .for_each(|(rect, color, size)| + .for_each(|(rect, color)| frame.stroke( &rect, Stroke::default() diff --git a/src/player.rs b/src/player.rs index b138d0d..3b30b85 100644 --- a/src/player.rs +++ b/src/player.rs @@ -155,6 +155,7 @@ impl Player { /// Return the duration of this track /// /// This is cheap and exact. All processing is done before hand. + #[allow(dead_code)] pub fn get_duration(&self) -> Duration { self.duration } diff --git a/src/styles.rs b/src/styles.rs index ff7fa05..6e101b6 100644 --- a/src/styles.rs +++ b/src/styles.rs @@ -5,8 +5,6 @@ use iced::Color; use iced::widget::container; use iced::widget::text_input; -const TRANSPARENT: Color = Color { r: 0., g: 0., b: 0., a: 0. }; - #[derive(Copy, Clone, Debug)] pub struct Theme { pub base_color: Color,