Implement Widget::draw for ProgressBar

This commit is contained in:
Héctor Ramón Jiménez 2021-10-28 17:36:36 +07:00
parent bc32199e39
commit e42e1e2f57
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
5 changed files with 63 additions and 82 deletions

View file

@ -2,22 +2,4 @@
//!
//! A [`ProgressBar`] has a range of possible values and a current value,
//! as well as a length, height and style.
use crate::{Backend, Renderer};
use iced_native::progress_bar;
pub use iced_style::progress_bar::{Style, StyleSheet};
/// A bar that displays progress.
///
/// This is an alias of an `iced_native` progress bar with an
/// `iced_wgpu::Renderer`.
pub type ProgressBar<Backend> = iced_native::ProgressBar<Renderer<Backend>>;
impl<B> progress_bar::Renderer for Renderer<B>
where
B: Backend,
{
type Style = Box<dyn StyleSheet>;
const DEFAULT_HEIGHT: u16 = 30;
}
pub use iced_native::progress_bar::*;