From b715155b20ef7fdb22d98f2bf5b915e78f03b936 Mon Sep 17 00:00:00 2001 From: Emi Simpson Date: Fri, 7 Jan 2022 17:39:24 -0500 Subject: [PATCH] Fixed the FUCKING bug y'know the one where the progress bar disappeared at many resolutions --- src/controls.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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()); } }