summaryrefslogtreecommitdiffstats
path: root/style/src/radio.rs
blob: a4d4a83b7a816015e34b8f0a1b6e3567cc92742f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//! Create choices using radio buttons.
use iced_core::{Background, Color};

/// The appearance of a radio button.
#[derive(Debug, Clone, Copy)]
pub struct Appearance {
    pub background: Background,
    pub dot_color: Color,
    pub border_width: f32,
    pub border_color: Color,
    pub text_color: Option<Color>,
}

/// A set of rules that dictate the style of a radio button.
pub trait StyleSheet {
    type Style: Default + Copy;

    fn active(&self, style: Self::Style) -> Appearance;

    fn hovered(&self, style: Self::Style) -> Appearance;
}