mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -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:
@@ -4,9 +4,9 @@ use std::ops::RangeInclusive;
|
||||
use egui::*;
|
||||
|
||||
use egui_plot::{
|
||||
Arrows, AxisBools, AxisHints, Bar, BarChart, BoxElem, BoxPlot, BoxSpread, CoordinatesFormatter,
|
||||
Corner, GridInput, GridMark, HLine, Legend, Line, LineStyle, MarkerShape, Plot, PlotImage,
|
||||
PlotPoint, PlotPoints, PlotResponse, Points, Polygon, Text, VLine,
|
||||
Arrows, AxisHints, Bar, BarChart, BoxElem, BoxPlot, BoxSpread, CoordinatesFormatter, Corner,
|
||||
GridInput, GridMark, HLine, Legend, Line, LineStyle, MarkerShape, Plot, PlotImage, PlotPoint,
|
||||
PlotPoints, PlotResponse, Points, Polygon, Text, VLine,
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -830,8 +830,8 @@ impl Default for Chart {
|
||||
struct ChartsDemo {
|
||||
chart: Chart,
|
||||
vertical: bool,
|
||||
allow_zoom: AxisBools,
|
||||
allow_drag: AxisBools,
|
||||
allow_zoom: Vec2b,
|
||||
allow_drag: Vec2b,
|
||||
}
|
||||
|
||||
impl Default for ChartsDemo {
|
||||
|
||||
Reference in New Issue
Block a user