1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00
Files
egui/crates
rustbasic 5ed92c3011 Add Button::left_text (#7955)
feat: Add left_text() to egui::Button

This PR introduces the `left_text()` method to `egui::Button`. It
enables placing additional text content on the left side of the button's
primary label, which is useful for displaying auxiliary information,
labels, and for facilitating left-aligned text within the button.

```rust
                            let is_selected = true;
                            let selectable_label_widget = egui::Button::selectable(
                                is_selected,
                                "",
                            ).left_text("Left");

                            let desired_width = ui.available_width();
                            let desired_height = ui.spacing().interact_size.y;

                            interaction_response = ui.add_sized(
                                egui::vec2(desired_width, desired_height),
                                selectable_label_widget,
                            );
```
2026-03-24 14:03:20 +01:00
..
2026-03-24 14:03:20 +01:00