Expand description
Property rows: a name and a value, their name column aligned.
Experimental: may change in any release
(docs/stability.md).
A PropertyRow is a ListItem’s row (its
height, its box, hovered under the pointer) split in two: the name, in
the row’s muted tone, and the value, any widget. The name column is as
wide as the widest name of its rows: the rows sharing a column id
(PropertyRow::column; by default, the rows of one Ui) line their
values up, as a selection panel does. The column never takes more than
NAME_SHARE of the row.
A value is editable unless the row is read-only
(PropertyRow::read_only: its widgets are disabled). A plain value
is text (PropertyRow::text); a widget given with
PropertyRow::widget is named by the property for screen readers.
use egui_pop_views::property::PropertyRow;
fn entity(ui: &mut egui::Ui, radius: &mut f32, visible: &mut bool) {
PropertyRow::new("Path").text(ui, "world/points");
PropertyRow::new("Archetype").text(ui, "Points3D");
PropertyRow::new("Radius").widget(ui, egui::DragValue::new(radius).speed(0.1));
PropertyRow::new("Visible").widget(ui, egui::Checkbox::without_text(visible));
}Structs§
- Property
Row - A name and a value: see the module.
Constants§
- NAME_
SHARE - The most of a row’s width its name column takes.