ui::Thickness¶
Header: winui/core/Geometry.hpp.
A per-edge thickness in DIPs, used for margins, paddings and border widths.
A number is the same value on every edge (.margin = 8). Other thicknesses name their edges, through ui::Edges (.margin = ui::Edges{.left = 32}) or ui::Symmetric (.padding = ui::Symmetric{.horizontal = 16, .vertical = 8}), so the code says which edge gets which value.
Example:
window.set_content(ui::VerticalStack{
.margin = ui::Symmetric{.horizontal = 24, .vertical = 12},
.content = {ui::Text{.text = "Indented", .margin = ui::Edges{.left = 16}}},
});
left¶
Left edge, DIPs.
top¶
Top edge, DIPs.
right¶
Right edge, DIPs.
bottom¶
Bottom edge, DIPs.
Thickness¶
All four edges 0.
Thickness¶
The same value on all four edges, so a field takes .margin = 8.
Thickness¶
The edges edges names; the others 0.
Thickness¶
horizontal on the left and right, vertical on the top and bottom.
horizontal¶
left + right: the width this thickness takes out of a rect.
vertical¶
top + bottom: the height this thickness takes out of a rect.