diff --git a/crates/ui-contract/src/runtime/egui/text_edit.rs b/crates/ui-contract/src/runtime/egui/text_edit.rs index aca9f4816..058057328 100644 --- a/crates/ui-contract/src/runtime/egui/text_edit.rs +++ b/crates/ui-contract/src/runtime/egui/text_edit.rs @@ -167,7 +167,8 @@ pub(crate) fn show(ui: &mut Ui, edit: Edit<'_>) -> Shown { .event_filter(filter) .return_key(if multiline { Some(egui::KeyboardShortcut::new(egui::Modifiers::NONE, egui::Key::Enter)) } else { None }) .layouter(&mut layouter) - // A laid-out galley sits at the rect's corner, as a painted run does. + // A laid-out galley sits at the rect's corner. Other text follows the same logical placement + // rule as primitives::text::free_room_before, with the row centred vertically. .align(match (align, rtl) { _ if galley.is_some() => egui::Align2::LEFT_TOP, (HAlign::Center, _) => egui::Align2::CENTER_CENTER, diff --git a/crates/ui-widgets/src/text/number.rs b/crates/ui-widgets/src/text/number.rs index 823a94fe5..2dcb1d4ad 100644 --- a/crates/ui-widgets/src/text/number.rs +++ b/crates/ui-widgets/src/text/number.rs @@ -344,7 +344,7 @@ impl<'a, V: NumberValue + 'static> NumberField<'a, V> { } /// The unit, measured, then the chevrons: what sits after the text. The unit stands apart at the end of the value - /// area, so units line up in a column of fields and the number centres in the room before its unit. A + /// area, so units line up in a column of fields; the value's alignment applies within the room before its unit. A /// content-sized field's unit is as wide as the widest of its column group's. fn after_text(&self, cx: &MeasureCx<'_, Self>, chevrons: &[(PartKey, Label)]) -> Vec { let shared = content_sized(cx);