Make Plot::highlight
take a boolean (#1159)
This commit is contained in:
parent
9d596967b4
commit
3418eb5d35
2 changed files with 21 additions and 20 deletions
|
@ -32,6 +32,7 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
|
||||||
* Replaced `Style::body_text_style` with more generic `Style::text_styles` ([#1154](https://github.com/emilk/egui/pull/1154)).
|
* Replaced `Style::body_text_style` with more generic `Style::text_styles` ([#1154](https://github.com/emilk/egui/pull/1154)).
|
||||||
* `TextStyle` is no longer `Copy` ([#1154](https://github.com/emilk/egui/pull/1154)).
|
* `TextStyle` is no longer `Copy` ([#1154](https://github.com/emilk/egui/pull/1154)).
|
||||||
* Replaced `TextEdit::text_style` with `TextEdit::font` ([#1154](https://github.com/emilk/egui/pull/1154)).
|
* Replaced `TextEdit::text_style` with `TextEdit::font` ([#1154](https://github.com/emilk/egui/pull/1154)).
|
||||||
|
* `Plot::highlight` now takes a `bool` argument ([#1159](https://github.com/emilk/egui/pull/1159)),
|
||||||
|
|
||||||
### Fixed 🐛
|
### Fixed 🐛
|
||||||
* Context menu now respects the theme ([#1043](https://github.com/emilk/egui/pull/1043))
|
* Context menu now respects the theme ([#1043](https://github.com/emilk/egui/pull/1043))
|
||||||
|
|
|
@ -117,8 +117,8 @@ impl HLine {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Highlight this line in the plot by scaling up the line.
|
/// Highlight this line in the plot by scaling up the line.
|
||||||
pub fn highlight(mut self) -> Self {
|
pub fn highlight(mut self, highlight: bool) -> Self {
|
||||||
self.highlight = true;
|
self.highlight = highlight;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,8 +227,8 @@ impl VLine {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Highlight this line in the plot by scaling up the line.
|
/// Highlight this line in the plot by scaling up the line.
|
||||||
pub fn highlight(mut self) -> Self {
|
pub fn highlight(mut self, highlight: bool) -> Self {
|
||||||
self.highlight = true;
|
self.highlight = highlight;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,8 +338,8 @@ impl Line {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Highlight this line in the plot by scaling up the line.
|
/// Highlight this line in the plot by scaling up the line.
|
||||||
pub fn highlight(mut self) -> Self {
|
pub fn highlight(mut self, highlight: bool) -> Self {
|
||||||
self.highlight = true;
|
self.highlight = highlight;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,8 +506,8 @@ impl Polygon {
|
||||||
|
|
||||||
/// Highlight this polygon in the plot by scaling up the stroke and reducing the fill
|
/// Highlight this polygon in the plot by scaling up the stroke and reducing the fill
|
||||||
/// transparency.
|
/// transparency.
|
||||||
pub fn highlight(mut self) -> Self {
|
pub fn highlight(mut self, highlight: bool) -> Self {
|
||||||
self.highlight = true;
|
self.highlight = highlight;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -635,8 +635,8 @@ impl Text {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Highlight this text in the plot by drawing a rectangle around it.
|
/// Highlight this text in the plot by drawing a rectangle around it.
|
||||||
pub fn highlight(mut self) -> Self {
|
pub fn highlight(mut self, highlight: bool) -> Self {
|
||||||
self.highlight = true;
|
self.highlight = highlight;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -763,8 +763,8 @@ impl Points {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Highlight these points in the plot by scaling up their markers.
|
/// Highlight these points in the plot by scaling up their markers.
|
||||||
pub fn highlight(mut self) -> Self {
|
pub fn highlight(mut self, highlight: bool) -> Self {
|
||||||
self.highlight = true;
|
self.highlight = highlight;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -979,8 +979,8 @@ impl Arrows {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Highlight these arrows in the plot.
|
/// Highlight these arrows in the plot.
|
||||||
pub fn highlight(mut self) -> Self {
|
pub fn highlight(mut self, highlight: bool) -> Self {
|
||||||
self.highlight = true;
|
self.highlight = highlight;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1105,8 +1105,8 @@ impl PlotImage {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Highlight this image in the plot.
|
/// Highlight this image in the plot.
|
||||||
pub fn highlight(mut self) -> Self {
|
pub fn highlight(mut self, highlight: bool) -> Self {
|
||||||
self.highlight = true;
|
self.highlight = highlight;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1295,8 +1295,8 @@ impl BarChart {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Highlight all plot elements.
|
/// Highlight all plot elements.
|
||||||
pub fn highlight(mut self) -> Self {
|
pub fn highlight(mut self, highlight: bool) -> Self {
|
||||||
self.highlight = true;
|
self.highlight = highlight;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1458,8 +1458,8 @@ impl BoxPlot {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Highlight all plot elements.
|
/// Highlight all plot elements.
|
||||||
pub fn highlight(mut self) -> Self {
|
pub fn highlight(mut self, highlight: bool) -> Self {
|
||||||
self.highlight = true;
|
self.highlight = highlight;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue