1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Change default text alignment to Center

This commit is contained in:
Emil Ernerfeldt
2024-09-17 10:43:27 +02:00
parent f4ed394a85
commit 74b8d669c0
4 changed files with 18 additions and 3 deletions

View File

@@ -279,6 +279,13 @@ pub struct TextFormat {
/// If you use a small font and [`Align::TOP`] you
/// can get the effect of raised text.
///
/// If you use a small font and [`Align::BOTTOM`]
/// you get the effect of a subscript.
///
/// If you use [`Align::center`], you get text that is centered
/// around a common center-line, which is nice when mixining emojis
/// and normal text in e.g. a button.
pub valign: Align,
// TODO(emilk): lowered
}
@@ -295,7 +302,7 @@ impl Default for TextFormat {
italics: false,
underline: Stroke::NONE,
strikethrough: Stroke::NONE,
valign: Align::BOTTOM,
valign: Align::Center,
}
}
}