1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

Make Center the default valign

This commit is contained in:
Emil Ernerfeldt
2024-09-19 10:10:36 +02:00
parent 7d51ab12d7
commit 190d432b09

View File

@@ -199,7 +199,7 @@ pub struct Style {
/// How to vertically align text. /// How to vertically align text.
/// ///
/// Default depends on layout. /// Set to `None` to use align that depends on the current layout.
pub override_text_valign: Option<Align>, pub override_text_valign: Option<Align>,
/// The [`FontFamily`] and size you want to use for a specific [`TextStyle`]. /// The [`FontFamily`] and size you want to use for a specific [`TextStyle`].
@@ -1207,7 +1207,7 @@ impl Default for Style {
Self { Self {
override_font_id: None, override_font_id: None,
override_text_style: None, override_text_style: None,
override_text_valign: None, override_text_valign: Some(Align::Center),
text_styles: default_text_styles(), text_styles: default_text_styles(),
drag_value_text_style: TextStyle::Button, drag_value_text_style: TextStyle::Button,
number_formatter: NumberFormatter(Arc::new(emath::format_with_decimals_in_range)), number_formatter: NumberFormatter(Arc::new(emath::format_with_decimals_in_range)),