Introduce Custom variants for every style in the built-in Theme

This commit is contained in:
Héctor Ramón Jiménez 2022-11-09 04:05:31 +01:00
parent 8102f96f12
commit 18fb74f200
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
34 changed files with 576 additions and 286 deletions

View file

@ -26,14 +26,14 @@ pub enum HandleShape {
/// A set of rules that dictate the style of a slider.
pub trait StyleSheet {
type Style: Default + Copy;
type Style: Default;
/// Produces the style of an active slider.
fn active(&self, style: Self::Style) -> Appearance;
fn active(&self, style: &Self::Style) -> Appearance;
/// Produces the style of an hovered slider.
fn hovered(&self, style: Self::Style) -> Appearance;
fn hovered(&self, style: &Self::Style) -> Appearance;
/// Produces the style of a slider that is being dragged.
fn dragging(&self, style: Self::Style) -> Appearance;
fn dragging(&self, style: &Self::Style) -> Appearance;
}