[][src]Struct kas_theme::ThemeColours

pub struct ThemeColours {
    pub background: Colour,
    pub frame: Colour,
    pub text_area: Colour,
    pub text: Colour,
    pub label_text: Colour,
    pub button_text: Colour,
    pub key_nav_focus: Colour,
    pub button: Colour,
    pub button_highlighted: Colour,
    pub button_depressed: Colour,
    pub checkbox: Colour,
}

Provides standard theme colours

Fields

background: Colourframe: Colourtext_area: Colourtext: Colourlabel_text: Colourbutton_text: Colourkey_nav_focus: Colourbutton: Colourbutton_highlighted: Colourbutton_depressed: Colourcheckbox: Colour

Methods

impl ThemeColours[src]

pub fn open(scheme: &str) -> Option<Self>[src]

Open the given scheme, if found

TODO: the intention is that this method can read and cache data from external resources. For now, we simply hard-code a few instances.

pub fn new() -> Self[src]

Default theme: grey with blue activable items

pub fn light() -> Self[src]

Light scheme

pub fn dark() -> Self[src]

Dark scheme

pub fn nav_region(&self, highlights: HighlightState) -> Option<Colour>[src]

Get colour for navigation highlight region, if any

pub fn button_state(&self, highlights: HighlightState) -> Colour[src]

Get colour for a button, depending on state

pub fn check_mark_state(
    &self,
    highlights: HighlightState,
    checked: bool
) -> Option<Colour>
[src]

Get colour for a checkbox mark, depending on state

pub fn scrollbar_state(&self, highlights: HighlightState) -> Colour[src]

Get colour of a scrollbar, depending on state

Trait Implementations

impl Clone for ThemeColours[src]

impl Debug for ThemeColours[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.