[][src]Struct egui::Style

pub struct Style {
    pub window_padding: Vec2,
    pub button_padding: Vec2,
    pub item_spacing: Vec2,
    pub indent: f32,
    pub clickable_diameter: f32,
    pub start_icon_width: f32,
    pub resize_interact_radius_side: f32,
    pub resize_interact_radius_corner: f32,
    pub interact: Interact,
    pub text_color: Color,
    pub line_width: f32,
    pub thin_outline: LineStyle,
    pub background_fill: Color,
    pub dark_bg_color: Color,
    pub cursor_blink_hz: f32,
    pub text_cursor_width: f32,
    pub animation_time: f32,
    pub window: Window,
    pub menu_bar: MenuBar,
    pub clip_rect_margin: f32,
    pub debug_widget_rects: bool,
    pub debug_resize: bool,
}

Fields

window_padding: Vec2

Horizontal and vertical padding within a window frame.

button_padding: Vec2

Button size is text size plus this on each side

item_spacing: Vec2

Horizontal and vertical spacing between widgets

indent: f32

Indent collapsing regions etc by this much.

clickable_diameter: f32

Anything clickable is (at least) this wide.

start_icon_width: f32

Checkboxes, radio button and collapsing headers have an icon at the start. The text starts after this many pixels.

resize_interact_radius_side: f32

Mouse must be the close to the side of a window to resize

resize_interact_radius_corner: f32

Mouse must be the close to the corner of a window to resize

interact: Interacttext_color: Colorline_width: f32

For stuff like check marks in check boxes.

thin_outline: LineStylebackground_fill: Color

e.g. the background of windows

dark_bg_color: Color

e.g. the background of the slider or text edit

cursor_blink_hz: f32text_cursor_width: f32animation_time: f32

How many seconds a typical animation should last

window: Windowmenu_bar: MenuBarclip_rect_margin: f32

Allow child widgets to be just on the border and still have an outline with some thickness

debug_widget_rects: booldebug_resize: bool

Implementations

impl Style[src]

pub fn interact(&self, interact: &InteractInfo) -> &WidgetStyle[src]

Use this style for interactive things

pub fn icon_rectangles(&self, rect: Rect) -> (Rect, Rect)[src]

Returns small icon rectangle and big icon rectangle

impl Style[src]

pub fn ui(&mut self, ui: &mut Ui)[src]

Trait Implementations

impl Clone for Style[src]

impl Debug for Style[src]

impl Default for Style[src]

Auto Trait Implementations

impl RefUnwindSafe for Style

impl Send for Style

impl Sync for Style

impl Unpin for Style

impl UnwindSafe for Style

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.