1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00: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:
Emil Ernerfeldt
2023-11-11 21:31:36 +01:00
committed by GitHub
parent 03a1471ddb
commit b27aa27e94
19 changed files with 148 additions and 119 deletions

View File

@@ -187,7 +187,7 @@ impl eframe::App for ImageViewer {
});
egui::CentralPanel::default().show(ctx, |ui| {
egui::ScrollArea::new([true, true]).show(ui, |ui| {
egui::ScrollArea::both().show(ui, |ui| {
let mut image = egui::Image::from_uri(&self.current_uri);
image = image.uv(self.image_options.uv);
image = image.bg_fill(self.image_options.bg_fill);