pub struct ContainerTheme(/* private fields */);Expand description
Theme overrides of how a container decorates its children.
This object is returned by Window::container_theme. It has no effect if the
window is not a container.
Settings that are not set fall back to the global theme. Not every setting has an effect on every container.
Implementations§
Source§impl ContainerTheme
impl ContainerTheme
Sourcepub fn set_color(&self, element: Colorable, color: Color)
pub fn set_color(&self, element: Colorable, color: Color)
Sets the color of a GUI element.
The following elements apply to the container as a whole. This theme takes priority over the global theme.
The following elements apply to the decorations of each child. The
WindowTheme of the child takes priority over this theme, which takes priority
over the global theme.
FOCUSED_BORDER_COLORBORDER_COLOR: only used as the default ofFOCUSED_BORDER_COLOR.UNFOCUSED_TITLE_BACKGROUND_COLORFOCUSED_TITLE_BACKGROUND_COLORFOCUSED_INACTIVE_TITLE_BACKGROUND_COLORATTENTION_REQUESTED_BACKGROUND_COLORUNFOCUSED_TITLE_TEXT_COLORFOCUSED_TITLE_TEXT_COLORFOCUSED_INACTIVE_TITLE_TEXT_COLOR
Sourcepub fn set_size(&self, element: Resizable, size: i32)
pub fn set_size(&self, element: Resizable, size: i32)
Sets the size of a GUI element.
The following elements are supported:
They apply to the container as a whole. This theme takes priority over the global theme.
Sourcepub fn set_show_titles(&self, show: bool)
pub fn set_show_titles(&self, show: bool)
Sets whether titles are shown.
This applies to the container as a whole. This theme takes priority over the global theme.
See also set_show_titles.
Sourcepub fn set_show_window_icons(&self, show: bool)
pub fn set_show_window_icons(&self, show: bool)
Sets whether window icons set by the client are shown.
This applies to the decorations of each child. The WindowTheme of the child
takes priority over this theme, which takes priority over the global theme.
See also set_show_window_icons.
Sourcepub fn set_window_icons_grayscale(&self, grayscale: bool)
pub fn set_window_icons_grayscale(&self, grayscale: bool)
Sets whether window icons set by the client are rendered as grayscale.
This applies to the decorations of each child. The WindowTheme of the child
takes priority over this theme, which takes priority over the global theme.
See also set_window_icons_grayscale.
Sourcepub fn set_title_font(&self, font: &str)
pub fn set_title_font(&self, font: &str)
Sets the font used by window titles.
This applies to the decorations of each child. The WindowTheme of the child
takes priority over this theme, which takes priority over the global theme.
See also set_title_font.
Sourcepub fn set_container_borders(&self, borders: ContainerBorders)
pub fn set_container_borders(&self, borders: ContainerBorders)
Sets the container border style.
This theme takes priority over the global theme.
See also set_container_borders.
Sourcepub fn unset_container_borders(&self)
pub fn unset_container_borders(&self)
Removes the override of the container border style.
See also set_container_borders.
Sourcepub fn get_container_borders(&self) -> Option<ContainerBorders>
pub fn get_container_borders(&self) -> Option<ContainerBorders>
Gets the override of the container border style.
Methods from Deref<Target = ThemeOverrides>§
Sourcepub fn unset_color(&self, element: Colorable)
pub fn unset_color(&self, element: Colorable)
Removes the color override of a GUI element.
See also set_color.
Sourcepub fn get_color(&self, element: Colorable) -> Option<Color>
pub fn get_color(&self, element: Colorable) -> Option<Color>
Gets the color override of a GUI element.
Sourcepub fn unset_size(&self, element: Resizable)
pub fn unset_size(&self, element: Resizable)
Removes the size override of a GUI element.
See also set_size.
Sourcepub fn get_size(&self, element: Resizable) -> Option<i32>
pub fn get_size(&self, element: Resizable) -> Option<i32>
Gets the size override of a GUI element.
Sourcepub fn set_show_titles(&self, show: bool)
pub fn set_show_titles(&self, show: bool)
Sets whether titles are shown.
See also set_show_titles.
Sourcepub fn unset_show_titles(&self)
pub fn unset_show_titles(&self)
Removes the override of whether titles are shown.
See also set_show_titles.
Sourcepub fn get_show_titles(&self) -> Option<bool>
pub fn get_show_titles(&self) -> Option<bool>
Gets the override of whether titles are shown.
Sourcepub fn set_show_window_icons(&self, show: bool)
pub fn set_show_window_icons(&self, show: bool)
Sets whether window icons set by the client are shown.
See also set_show_window_icons.
Sourcepub fn unset_show_window_icons(&self)
pub fn unset_show_window_icons(&self)
Removes the override of whether window icons set by the client are shown.
See also set_show_window_icons.
Sourcepub fn set_window_icons_grayscale(&self, grayscale: bool)
pub fn set_window_icons_grayscale(&self, grayscale: bool)
Sets whether window icons set by the client are rendered as grayscale.
See also set_window_icons_grayscale.
Sourcepub fn unset_window_icons_grayscale(&self)
pub fn unset_window_icons_grayscale(&self)
Removes the override of whether window icons set by the client are rendered as grayscale.
See also set_window_icons_grayscale.
Sourcepub fn set_title_font(&self, font: &str)
pub fn set_title_font(&self, font: &str)
Sets the font used by window titles.
See also set_title_font.
Sourcepub fn unset_title_font(&self)
pub fn unset_title_font(&self)
Removes the override of the font used by window titles.
See also set_title_font.