pub trait ThemeStyling {
    // Required methods
    fn theme_defaults(&self) -> DefaultThemeProps;
    fn get_button_style(
        &self,
        button_props: ButtonProps
    ) -> Box<dyn Fn(Style) -> Style + '_>;
    fn get_checkbox_style(
        &self,
        checkbox_props: CheckboxProps
    ) -> Box<dyn Fn(Style) -> Style + '_>;
    fn get_input_style(
        &self,
        checkbox_props: InputProps
    ) -> Box<dyn Fn(Style) -> Style + '_>;
    fn get_toggle_style(
        &self,
        toggle_props: ToggleProps
    ) -> Box<dyn Fn(Style) -> Style + '_>;
    fn get_radio_style(
        &self,
        radio_props: RadioProps
    ) -> (Box<dyn Fn(Style) -> Style + '_>, Box<dyn Fn(Style) -> Style + '_>);
    fn get_header_style(
        &self,
        header_props: HeaderProps
    ) -> Box<dyn Fn(Style) -> Style + '_>;
    fn get_divider_style(&self) -> Box<dyn Fn(Style) -> Style + '_>;
    fn get_tooltip_style(
        &self,
        tooltip_props: TooltipProps
    ) -> Box<dyn Fn(Style) -> Style + '_>;
    fn get_badge_style(
        &self,
        badge_props: BadgeProps
    ) -> Box<dyn Fn(Style) -> Style + '_>;
}
Expand description

To be implemented by themes.

Required Methods§

source

fn theme_defaults(&self) -> DefaultThemeProps

Defines a set of colors to be used by the theme. This can be adjusted within specific widget function later if needed, but for a vast majority of themes the colors are reused.

source

fn get_button_style( &self, button_props: ButtonProps ) -> Box<dyn Fn(Style) -> Style + '_>

Defines how a button style should look like.

source

fn get_checkbox_style( &self, checkbox_props: CheckboxProps ) -> Box<dyn Fn(Style) -> Style + '_>

Defines how a checkbox should look like.

source

fn get_input_style( &self, checkbox_props: InputProps ) -> Box<dyn Fn(Style) -> Style + '_>

Defines how a input should look like.

source

fn get_toggle_style( &self, toggle_props: ToggleProps ) -> Box<dyn Fn(Style) -> Style + '_>

Defines how a toggle should look like.

source

fn get_radio_style( &self, radio_props: RadioProps ) -> (Box<dyn Fn(Style) -> Style + '_>, Box<dyn Fn(Style) -> Style + '_>)

Defines how a radio_button should look like. Returns a tuple, where first argument styles the “dot” of the active radio and the second one is the “outer circle”, containing the default state of the radio.

source

fn get_header_style( &self, header_props: HeaderProps ) -> Box<dyn Fn(Style) -> Style + '_>

Defines how a text_header should look like.

source

fn get_divider_style(&self) -> Box<dyn Fn(Style) -> Style + '_>

Defines how a text_divider should look like.

source

fn get_tooltip_style( &self, tooltip_props: TooltipProps ) -> Box<dyn Fn(Style) -> Style + '_>

Defines how a tooltip should look like.

source

fn get_badge_style( &self, badge_props: BadgeProps ) -> Box<dyn Fn(Style) -> Style + '_>

Defines how a badge should look like.

Implementors§