This commit is contained in:
YgorSouza 2024-07-07 08:50:04 +02:00 committed by GitHub
parent 0f6310c598
commit 39f7368d2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 8 deletions

View File

@ -776,7 +776,7 @@ impl Context {
self.write(|ctx| ctx.begin_frame_mut(new_input)); self.write(|ctx| ctx.begin_frame_mut(new_input));
// Plugs run just after the frame has started: // Plugins run just after the frame has started:
self.read(|ctx| ctx.plugins.clone()).on_begin_frame(self); self.read(|ctx| ctx.plugins.clone()).on_begin_frame(self);
} }
} }

View File

@ -99,8 +99,8 @@ impl Tooltips {
}); });
}; };
ui.label("You can have different tooltips depending on whether or not a widget is enabled or not:") ui.label("You can have different tooltips depending on whether or not a widget is enabled:")
.on_hover_text("Check the tooltip of the button below, and see how it changes dependning on whether or not it is enabled."); .on_hover_text("Check the tooltip of the button below, and see how it changes depending on whether or not it is enabled.");
ui.horizontal(|ui| { ui.horizontal(|ui| {
ui.checkbox(&mut self.enabled, "Enabled") ui.checkbox(&mut self.enabled, "Enabled")

View File

@ -115,7 +115,7 @@ impl<'a> AxisHints<'a> {
Self::new(Axis::X) Self::new(Axis::X)
} }
/// Initializes a default axis configuration for the X axis. /// Initializes a default axis configuration for the Y axis.
pub fn new_y() -> Self { pub fn new_y() -> Self {
Self::new(Axis::Y) Self::new(Axis::Y)
} }
@ -232,7 +232,7 @@ pub(super) struct AxisWidget<'a> {
} }
impl<'a> AxisWidget<'a> { impl<'a> AxisWidget<'a> {
/// if `rect` as width or height == 0, is will be automatically calculated from ticks and text. /// if `rect` has width or height == 0, it will be automatically calculated from ticks and text.
pub fn new(hints: AxisHints<'a>, rect: Rect) -> Self { pub fn new(hints: AxisHints<'a>, rect: Rect) -> Self {
Self { Self {
range: (0.0..=0.0), range: (0.0..=0.0),

View File

@ -186,7 +186,7 @@ impl LegendWidget {
rect: Rect, rect: Rect,
config: Legend, config: Legend,
items: &[Box<dyn PlotItem>], items: &[Box<dyn PlotItem>],
hidden_items: &ahash::HashSet<String>, // Existing hiddent items in the plot memory. hidden_items: &ahash::HashSet<String>, // Existing hidden items in the plot memory.
) -> Option<Self> { ) -> Option<Self> {
// If `config.hidden_items` is not `None`, it is used. // If `config.hidden_items` is not `None`, it is used.
let hidden_items = config.hidden_items.as_ref().unwrap_or(hidden_items); let hidden_items = config.hidden_items.as_ref().unwrap_or(hidden_items);

View File

@ -1359,7 +1359,7 @@ fn axis_widgets<'a>(
plot_rect = complete_rect; plot_rect = complete_rect;
} }
// Bow that we know the final x_range of the plot_rect, // Now that we know the final x_range of the plot_rect,
// assign it to the x_axis_widgets (they are currently too wide): // assign it to the x_axis_widgets (they are currently too wide):
for widget in &mut x_axis_widgets { for widget in &mut x_axis_widgets {
widget.rect = Rect::from_x_y_ranges(plot_rect.x_range(), widget.rect.y_range()); widget.rect = Rect::from_x_y_ranges(plot_rect.x_range(), widget.rect.y_range());

View File

@ -61,7 +61,7 @@ impl PlotUi {
&self.response &self.response
} }
/// Scale the plot bounds around a position in screen coordinates. /// Scale the plot bounds around a position in plot coordinates.
/// ///
/// Can be useful for implementing alternative plot navigation methods. /// Can be useful for implementing alternative plot navigation methods.
/// ///