2020-01-09 18:31:07 +01:00
|
|
|
//! Use default styling attributes to inherit styles.
|
2019-12-30 12:14:26 +01:00
|
|
|
use iced_native::Color;
|
|
|
|
|
|
2020-01-09 18:31:07 +01:00
|
|
|
/// Some default styling attributes.
|
2019-12-30 12:14:26 +01:00
|
|
|
#[derive(Debug, Clone, Copy)]
|
|
|
|
|
pub struct Defaults {
|
2020-01-09 18:31:07 +01:00
|
|
|
/// Text styling
|
2019-12-30 12:14:26 +01:00
|
|
|
pub text: Text,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Default for Defaults {
|
|
|
|
|
fn default() -> Defaults {
|
|
|
|
|
Defaults {
|
|
|
|
|
text: Text::default(),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-09 18:31:07 +01:00
|
|
|
/// Some default text styling attributes.
|
2019-12-30 12:14:26 +01:00
|
|
|
#[derive(Debug, Clone, Copy)]
|
|
|
|
|
pub struct Text {
|
2020-01-09 18:31:07 +01:00
|
|
|
/// The default color of text
|
2019-12-30 12:14:26 +01:00
|
|
|
pub color: Color,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Default for Text {
|
|
|
|
|
fn default() -> Text {
|
|
|
|
|
Text {
|
|
|
|
|
color: Color::BLACK,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|