Skip to main content

Style

Struct Style 

Source
#[non_exhaustive]
pub struct Style {
Show 18 fields pub scale: UiScale, pub padding: f32, pub spacing: f32, pub indent: f32, pub control_share: f32, pub control_width: f32, pub scrollbar: f32, pub min_size: Vec2, pub panel: Color, pub title: Color, pub title_front: Color, pub widget: Color, pub hot: Color, pub active: Color, pub accent: Color, pub text: Color, pub dim: Color, pub selection: Color,
}
Expand description

The debug UI’s look. Sizes are in UI units: a UI unit is a pixel of the font.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§scale: UiScale

The UI’s scale: the settings’ UI scale, a free one, by default the output’s own pixels (UiScale::Free(1.0)).

§padding: f32

Around a row’s text, above and below, and inside a window’s edges.

§spacing: f32

Between two rows, or two widgets of a row.

§indent: f32

How far a tree node’s children are moved in.

§control_share: f32

How much of a row a control takes, its label after it.

§control_width: f32

How wide a labelled control is in a row of several (Ui::horizontal).

§scrollbar: f32

How wide the scrollbar is, and how large the resize grip.

§min_size: Vec2

The smallest a window may be made.

§panel: Color

A window’s body.

§title: Color

A window’s title bar.

§title_front: Color

The title bar of the window in front.

§widget: Color

A control at rest.

§hot: Color

A control under the pointer.

§active: Color

A control held.

§accent: Color

A checkbox’s mark, a slider’s handle, a plot’s line.

§text: Color

Text.

§dim: Color

A line, the scrollbar’s track.

§selection: Color

Selected text.

Trait Implementations§

Source§

impl Clone for Style

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Style

Source§

impl Debug for Style

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Style

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Style

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Style

Auto Trait Implementations§

§

impl Forget for Style

§

impl Freeze for Style

§

impl Move for Style

§

impl RefUnwindSafe for Style

§

impl Send for Style

§

impl Sync for Style

§

impl Unpin for Style

§

impl UnsafeUnpin for Style

§

impl UnwindSafe for Style

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.