StyledExt

Trait StyledExt 

Source
pub trait StyledExt: Styled + Sized {
Show 24 methods // Provided methods fn refine_style(self, style: &StyleRefinement) -> Self { ... } fn h_flex(self) -> Self { ... } fn v_flex(self) -> Self { ... } fn paddings<L>(self, paddings: impl Into<Edges<L>>) -> Self where L: Into<DefiniteLength> + Clone + Default + Debug + PartialEq { ... } fn margins<L>(self, margins: impl Into<Edges<L>>) -> Self where L: Into<DefiniteLength> + Clone + Default + Debug + PartialEq { ... } fn debug_red(self) -> Self { ... } fn debug_blue(self) -> Self { ... } fn debug_yellow(self) -> Self { ... } fn debug_green(self) -> Self { ... } fn debug_pink(self) -> Self { ... } fn debug_focused( self, focus_handle: &FocusHandle, window: &Window, cx: &App, ) -> Self { ... } fn focused_border(self, cx: &App) -> Self { ... } fn scrollable(self, axis: impl Into<ScrollbarAxis>) -> Scrollable<Self> where Self: Element { ... } fn font_thin(self) -> Self { ... } fn font_extralight(self) -> Self { ... } fn font_light(self) -> Self { ... } fn font_normal(self) -> Self { ... } fn font_medium(self) -> Self { ... } fn font_semibold(self) -> Self { ... } fn font_bold(self) -> Self { ... } fn font_extrabold(self) -> Self { ... } fn font_black(self) -> Self { ... } fn popover_style(self, cx: &App) -> Self { ... } fn corner_radii(self, radius: Corners<Pixels>) -> Self { ... }
}
Expand description

Extends gpui::Styled with specific styling methods.

Provided Methods§

Source

fn refine_style(self, style: &StyleRefinement) -> Self

Refine the style of this element, applying the given style refinement.

Source

fn h_flex(self) -> Self

Apply self into a horizontal flex layout.

Source

fn v_flex(self) -> Self

Apply self into a vertical flex layout.

Source

fn paddings<L>(self, paddings: impl Into<Edges<L>>) -> Self

Apply paddings to the element.

Source

fn margins<L>(self, margins: impl Into<Edges<L>>) -> Self

Apply margins to the element.

Source

fn debug_red(self) -> Self

Render a border with a width of 1px, color red

Source

fn debug_blue(self) -> Self

Render a border with a width of 1px, color blue

Source

fn debug_yellow(self) -> Self

Render a border with a width of 1px, color yellow

Source

fn debug_green(self) -> Self

Render a border with a width of 1px, color green

Source

fn debug_pink(self) -> Self

Render a border with a width of 1px, color pink

Source

fn debug_focused( self, focus_handle: &FocusHandle, window: &Window, cx: &App, ) -> Self

Render a 1px blue border, when if the element is focused

Source

fn focused_border(self, cx: &App) -> Self

Render a border with a width of 1px, color ring color

Source

fn scrollable(self, axis: impl Into<ScrollbarAxis>) -> Scrollable<Self>
where Self: Element,

Wraps the element in a ScrollView.

Current this is only have a vertical scrollbar.

Source

fn font_thin(self) -> Self

Source

fn font_extralight(self) -> Self

Source

fn font_light(self) -> Self

Source

fn font_normal(self) -> Self

Source

fn font_medium(self) -> Self

Source

fn font_semibold(self) -> Self

Source

fn font_bold(self) -> Self

Source

fn font_extrabold(self) -> Self

Source

fn font_black(self) -> Self

Source

fn popover_style(self, cx: &App) -> Self

Set as Popover style

Source

fn corner_radii(self, radius: Corners<Pixels>) -> Self

Set corner radii for the element.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<E: Styled> StyledExt for E