pub struct Spacing {Show 17 fields
pub item_spacing: Vec2,
pub window_margin: Margin,
pub button_padding: Vec2,
pub menu_margin: Margin,
pub indent: f32,
pub interact_size: Vec2,
pub slider_width: f32,
pub text_edit_width: f32,
pub icon_width: f32,
pub icon_width_inner: 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,
pub scroll_bar_inner_margin: f32,
pub scroll_bar_outer_margin: f32,
}Expand description
Controls the sizes and distances between widgets.
Fields§
§item_spacing: Vec2Horizontal 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_margin: MarginHorizontal and vertical margins within a window frame.
Button size is text size plus this on each side
Horizontal and vertical margins within a menu frame.
indent: f32Indent collapsing regions etc by this much.
interact_size: Vec2Minimum 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§text_edit_width: f32Default width of a TextEdit.
icon_width: f32Checkboxes, radio button and collapsing headers have an icon at the start. This is the width/height of the outer part of this icon (e.g. the BOX of the checkbox).
icon_width_inner: f32Checkboxes, radio button and collapsing headers have an icon at the start. This is the width/height of the inner part of this icon (e.g. the check of the checkbox).
icon_spacing: f32Checkboxes, radio button and collapsing headers have an icon at the start. This is the spacing between the icon and the text
tooltip_width: f32Width of a tooltip (on_hover_ui, on_hover_text etc).
indent_ends_with_horizontal_line: boolEnd indented regions with a horizontal line
combo_height: f32Height of a combo-box before showing scroll bars.
scroll_bar_width: f32§scroll_bar_inner_margin: f32Margin between contents and scroll bar.
scroll_bar_outer_margin: f32Margin between scroll bar and the outer container (e.g. right of a vertical scroll bar).