Struct dotrix_egui::style::Spacing[][src]

pub struct Spacing {
Show 13 fields pub item_spacing: Vec2, pub window_padding: Vec2, pub button_padding: Vec2, pub indent: f32, pub interact_size: Vec2, pub slider_width: f32, pub text_edit_width: f32, pub icon_width: f32, pub icon_spacing: f32, pub tooltip_width: f32, pub indent_ends_with_horizontal_line: bool, pub combo_height: f32, pub scroll_bar_width: f32,
}
Expand description

Controls the sizes and distances between widgets.

Fields

item_spacing: Vec2

Horizontal and vertical spacing between widgets.

To add extra space between widgets, use Ui::add_space.

item_spacing is inserted after adding a widget, so to increase the spacing between widgets A and B you need to change item_spacing before adding A.

window_padding: Vec2

Horizontal and vertical padding within a window frame.

button_padding: Vec2

Button size is text size plus this on each side

indent: f32

Indent collapsing regions etc by this much.

interact_size: Vec2

Minimum size of a DragValue, color picker button, and other small widgets. interact_size.y is the default height of button, slider, etc. Anything clickable should be (at least) this size.

slider_width: f32

Default width of a Slider and ComboBox.

text_edit_width: f32

Default width of a TextEdit.

icon_width: f32

Checkboxes, radio button and collapsing headers have an icon at the start. This is the width/height of this icon.

icon_spacing: f32

Checkboxes, radio button and collapsing headers have an icon at the start. This is the spacing between the icon and the text

tooltip_width: f32

Width of a tooltip (on_hover_ui, on_hover_text etc).

indent_ends_with_horizontal_line: bool

End indented regions with a horizontal line

combo_height: f32

Height of a combo-box before showing scroll bars.

scroll_bar_width: f32

Implementations

Returns small icon rectangle and big icon rectangle

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Constructs wrapped service

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.