Upgrade SAO theming #43
|
@ -1,4 +1,4 @@
|
||||||
use canary_script::Color;
|
use canary_script::{api::Font, Color};
|
||||||
|
|
||||||
/// A reusable set of colors. Used by default widget styles.
|
/// A reusable set of colors. Used by default widget styles.
|
||||||
pub struct Palette {
|
pub struct Palette {
|
||||||
|
@ -10,7 +10,7 @@ pub struct Palette {
|
||||||
|
|
||||||
/// Sword Art Online color palette.
|
/// Sword Art Online color palette.
|
||||||
pub const SAO_PALETTE: Palette = Palette {
|
pub const SAO_PALETTE: Palette = Palette {
|
||||||
base: Color::WHITE.with_alpha(0xc0),
|
base: Color::WHITE.with_alpha(0xa0),
|
||||||
surface: Color::WHITE,
|
surface: Color::WHITE,
|
||||||
overlay: Color::WHITE,
|
overlay: Color::WHITE,
|
||||||
text: Color::BLACK,
|
text: Color::BLACK,
|
||||||
|
@ -24,5 +24,21 @@ pub const ROSE_PINE_PALETTE: Palette = Palette {
|
||||||
text: Color(0xe0def4ff),
|
text: Color(0xe0def4ff),
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The global palette.
|
/// Common measurements for widget shapes.
|
||||||
pub const PALETTE: Palette = ROSE_PINE_PALETTE;
|
pub struct Metrics {
|
||||||
|
pub surface_rounding: f32,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Common default parameters for widget styles.
|
||||||
|
pub struct Theme {
|
||||||
|
pub palette: Palette,
|
||||||
|
pub metrics: Metrics,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The global theme.
|
||||||
|
pub const THEME: Theme = Theme {
|
||||||
|
palette: ROSE_PINE_PALETTE,
|
||||||
|
metrics: Metrics {
|
||||||
|
surface_rounding: 5.0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue