Wire up styling to Slider in iced_native

This commit is contained in:
Héctor Ramón Jiménez 2021-10-20 15:50:42 +07:00
parent e00a2e9b2d
commit 11bcb13427
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
9 changed files with 31 additions and 97 deletions

View file

@ -1,24 +1,5 @@
//! Display an interactive selector of a single value from a range of values.
//!
//! A [`Slider`] has some local [`State`].
use crate::{Backend, Renderer};
use iced_native::slider;
pub use iced_native::slider::State;
pub use iced_native::slider::{Slider, State};
pub use iced_style::slider::{Handle, HandleShape, Style, StyleSheet};
/// An horizontal bar and a handle that selects a single value from a range of
/// values.
///
/// This is an alias of an `iced_native` slider with an `iced_wgpu::Renderer`.
pub type Slider<'a, T, Message, Backend> =
iced_native::Slider<'a, T, Message, Renderer<Backend>>;
impl<B> slider::Renderer for Renderer<B>
where
B: Backend,
{
type Style = Box<dyn StyleSheet>;
const DEFAULT_HEIGHT: u16 = 22;
}