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

Fix valign typo (#1870)

This commit is contained in:
quietvoid
2022-07-30 08:55:34 -04:00
committed by GitHub
parent 235d77713d
commit 8997519eb2

View File

@@ -155,13 +155,13 @@ impl Layout {
/// ///
/// The `valign` parameter controls how to align elements vertically. /// The `valign` parameter controls how to align elements vertically.
#[inline(always)] #[inline(always)]
pub fn left_to_right(valing: Align) -> Self { pub fn left_to_right(valign: Align) -> Self {
Self { Self {
main_dir: Direction::LeftToRight, main_dir: Direction::LeftToRight,
main_wrap: false, main_wrap: false,
main_align: Align::Center, // looks best to e.g. center text within a button main_align: Align::Center, // looks best to e.g. center text within a button
main_justify: false, main_justify: false,
cross_align: valing, cross_align: valign,
cross_justify: false, cross_justify: false,
} }
} }
@@ -170,13 +170,13 @@ impl Layout {
/// ///
/// The `valign` parameter controls how to align elements vertically. /// The `valign` parameter controls how to align elements vertically.
#[inline(always)] #[inline(always)]
pub fn right_to_left(valing: Align) -> Self { pub fn right_to_left(valign: Align) -> Self {
Self { Self {
main_dir: Direction::RightToLeft, main_dir: Direction::RightToLeft,
main_wrap: false, main_wrap: false,
main_align: Align::Center, // looks best to e.g. center text within a button main_align: Align::Center, // looks best to e.g. center text within a button
main_justify: false, main_justify: false,
cross_align: valing, cross_align: valign,
cross_justify: false, cross_justify: false,
} }
} }