mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Add emath::Vec2b, replacing egui_plot::AxisBools (#3543)
Thanks to `impl From<bool> for Vec2b` one can now shorten some builder
calls, like:
Previous:
```rust
egui::ScrollArea::vertical()
.auto_shrink([false; 2])
```
New:
```rust
egui::ScrollArea::vertical()
.auto_shrink(false)
```
This commit is contained in:
@@ -26,7 +26,7 @@ impl eframe::App for Content {
|
||||
self.text.clear();
|
||||
}
|
||||
ScrollArea::vertical()
|
||||
.auto_shrink([false; 2])
|
||||
.auto_shrink(false)
|
||||
.stick_to_bottom(true)
|
||||
.show(ui, |ui| {
|
||||
ui.label(&self.text);
|
||||
|
||||
Reference in New Issue
Block a user