diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index 7ad155f16..7d9dddf0d 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -240,6 +240,18 @@ impl<'a> Button<'a> { self } + /// Show some text on the left side of the button. + #[inline] + pub fn left_text(mut self, left_text: impl IntoAtoms<'a>) -> Self { + self.layout.push_left(Atom::grow()); + + for atom in left_text.into_atoms() { + self.layout.push_left(atom); + } + + self + } + /// Show some text on the right side of the button. #[inline] pub fn right_text(mut self, right_text: impl IntoAtoms<'a>) -> Self {