diff --git a/src/controls.rs b/src/controls.rs index 8fc4e95..387937a 100644 --- a/src/controls.rs +++ b/src/controls.rs @@ -2,6 +2,7 @@ use iced::Command; use core::time::Duration; use iced::Length; use iced::Color; +use iced::Point; use symphonia::core::formats::FormatReader; use crate::player::PlayerError; use iced::canvas::event::Status; @@ -111,23 +112,23 @@ impl Program for (&Controls, Theme) { let mut background = self.1.text_color; background.a = 0.2; - frame.fill_rectangle(bounds.position(), bounds.size(), background); + frame.fill_rectangle(Point::ORIGIN, bounds.size(), background); let mut played_size = bounds.size(); played_size.height *= player.position_percent(); - frame.fill_rectangle(bounds.position(), played_size, self.1.text_color); + frame.fill_rectangle(Point::ORIGIN, played_size, self.1.text_color); }, NoError { player: _, has_device: false } => { let mut background = self.1.text_color; background.a = 0.1; - frame.fill_rectangle(bounds.position(), bounds.size(), background); + frame.fill_rectangle(Point::ORIGIN, bounds.size(), background); }, Error(e) => { let background = Color {r: 1., g: 0.1, b: 0.1, a: 1.}; - frame.fill_rectangle(bounds.position(), bounds.size(), background); + frame.fill_rectangle(Point::ORIGIN, bounds.size(), background); eprintln!("Error!!! {}", e.to_string()); } }