Trait cosmic::iced::widget::scrollable::StyleSheet

source ·
pub trait StyleSheet {
    type Style: Default;

    // Required methods
    fn active(&self, style: &Self::Style) -> Scrollbar;
    fn hovered(
        &self,
        style: &Self::Style,
        is_mouse_over_scrollbar: bool,
    ) -> Scrollbar;

    // Provided methods
    fn dragging(&self, style: &Self::Style) -> Scrollbar { ... }
    fn active_horizontal(&self, style: &Self::Style) -> Scrollbar { ... }
    fn hovered_horizontal(
        &self,
        style: &Self::Style,
        is_mouse_over_scrollbar: bool,
    ) -> Scrollbar { ... }
    fn dragging_horizontal(&self, style: &Self::Style) -> Scrollbar { ... }
}
Expand description

A set of rules that dictate the style of a scrollable.

Required Associated Types§

source

type Style: Default

The supported style of the StyleSheet.

Required Methods§

source

fn active(&self, style: &Self::Style) -> Scrollbar

Produces the style of an active scrollbar.

source

fn hovered( &self, style: &Self::Style, is_mouse_over_scrollbar: bool, ) -> Scrollbar

Produces the style of a scrollbar when the scrollable is being hovered.

Provided Methods§

source

fn dragging(&self, style: &Self::Style) -> Scrollbar

Produces the style of a scrollbar that is being dragged.

source

fn active_horizontal(&self, style: &Self::Style) -> Scrollbar

Produces the style of an active horizontal scrollbar.

source

fn hovered_horizontal( &self, style: &Self::Style, is_mouse_over_scrollbar: bool, ) -> Scrollbar

Produces the style of a horizontal scrollbar when the scrollable is being hovered.

source

fn dragging_horizontal(&self, style: &Self::Style) -> Scrollbar

Produces the style of a horizontal scrollbar that is being dragged.

Implementors§

source§

impl StyleSheet for cosmic::iced_winit::style::Theme

source§

impl StyleSheet for cosmic::Theme