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:
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user