[][src]Trait smithay_client_toolkit::window::Theme

pub trait Theme: Send + 'static {
    fn get_primary_color(&self, active: bool) -> [u8; 4];
fn get_secondary_color(&self, active: bool) -> [u8; 4];
fn get_close_button_color(&self, status: ButtonState) -> [u8; 4];
fn get_maximize_button_color(&self, status: ButtonState) -> [u8; 4];
fn get_minimize_button_color(&self, status: ButtonState) -> [u8; 4]; fn get_close_button_icon_color(&self, status: ButtonState) -> [u8; 4] { ... }
fn get_maximize_button_icon_color(&self, status: ButtonState) -> [u8; 4] { ... }
fn get_minimize_button_icon_color(&self, status: ButtonState) -> [u8; 4] { ... } }

Interface for defining the theme of window decorations

A type implementing this trait can be used to define custom themes to adjust the decorations provided by a type implementing the 'Frame' trait

Note that the buttons will be drawn on top of the primary/secondary color. As such if their alpha channel is not 255 some blending will occur.

On ConceptFrame, setting the alpha channel to 0 thus makes the button background the same color as the titlebar.

All colors are to be specified in ARGB format.

Required methods

fn get_primary_color(&self, active: bool) -> [u8; 4]

Gets the primary color of the scheme, active when window is

fn get_secondary_color(&self, active: bool) -> [u8; 4]

Gets the secondary color of the scheme, active when window is

fn get_close_button_color(&self, status: ButtonState) -> [u8; 4]

Gets the color for the close button, active when button is hovered over

fn get_maximize_button_color(&self, status: ButtonState) -> [u8; 4]

Gets the background color for the maximize button, active when button is hovered over

fn get_minimize_button_color(&self, status: ButtonState) -> [u8; 4]

Gets the background color for the minimize button, active when button is hovered over

Loading content...

Provided methods

fn get_close_button_icon_color(&self, status: ButtonState) -> [u8; 4]

Gets the icon color for the close button, this defaults to the secondary color (for backwards compatibility)

fn get_maximize_button_icon_color(&self, status: ButtonState) -> [u8; 4]

Gets the icon color for the maximize button, this defaults to the secondary color (for backwards compatibility)

fn get_minimize_button_icon_color(&self, status: ButtonState) -> [u8; 4]

Gets the icon color for the minimize button, this defaults to the secondary color (for backwards compatibility)

Loading content...

Implementors

Loading content...