From ee3b04ea17da46a43afda45961c850367d4f5fba Mon Sep 17 00:00:00 2001 From: YgorSouza <43298013+YgorSouza@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:10:59 +0200 Subject: [PATCH] Fix typos (#4640) --- crates/egui/src/lib.rs | 2 +- crates/egui/src/style.rs | 8 ++++---- crates/egui/src/text_selection/cursor_range.rs | 4 ++-- crates/egui_demo_lib/src/demo/misc_demo_window.rs | 2 +- crates/egui_demo_lib/src/demo/tooltips.rs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/egui/src/lib.rs b/crates/egui/src/lib.rs index 3358e09b..a3f3d729 100644 --- a/crates/egui/src/lib.rs +++ b/crates/egui/src/lib.rs @@ -3,7 +3,7 @@ //! Try the live web demo: . Read more about egui at . //! //! `egui` is in heavy development, with each new version having breaking changes. -//! You need to have rust 1.62.0 or later to use `egui`. +//! You need to have rust 1.76.0 or later to use `egui`. //! //! To quickly get started with egui, you can take a look at [`eframe_template`](https://github.com/emilk/eframe_template) //! which uses [`eframe`](https://docs.rs/eframe). diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index f306a73d..1e865e4c 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -401,7 +401,7 @@ pub struct ScrollStyle { /// When the user hovers the scroll bars they expand to [`Self::bar_width`]. pub floating_width: f32, - /// How much space i allocated for a floating scroll bar? + /// How much space is allocated for a floating scroll bar? /// /// Normally this is zero, but you could set this to something small /// like 4.0 and set [`Self::dormant_handle_opacity`] and @@ -499,7 +499,7 @@ impl ScrollStyle { active_background_opacity: 1.0, active_handle_opacity: 1.0, - // Be tranlucent when expanded so we can see the content + // Be translucent when expanded so we can see the content interact_background_opacity: 0.6, interact_handle_opacity: 0.6, @@ -652,7 +652,7 @@ pub struct Interaction { /// Radius of the interactive area of the corner of a window during drag-to-resize. pub resize_grab_radius_corner: f32, - /// If `false`, tooltips will show up anytime you hover anything, even is mouse is still moving + /// If `false`, tooltips will show up anytime you hover anything, even if mouse is still moving pub show_tooltips_only_when_still: bool, /// Delay in seconds before showing tooltips after the mouse stops moving @@ -2118,7 +2118,7 @@ impl HandleShape { pub enum NumericColorSpace { /// RGB is 0-255 in gamma space. /// - /// Alpha is 0-255 in linear space . + /// Alpha is 0-255 in linear space. GammaByte, /// 0-1 in linear space. diff --git a/crates/egui/src/text_selection/cursor_range.rs b/crates/egui/src/text_selection/cursor_range.rs index cf17a2e9..7a619983 100644 --- a/crates/egui/src/text_selection/cursor_range.rs +++ b/crates/egui/src/text_selection/cursor_range.rs @@ -72,7 +72,7 @@ impl CursorRange { } /// If there is a selection, None is returned. - /// If the two ends is the same, that is returned. + /// If the two ends are the same, that is returned. pub fn single(&self) -> Option { if self.is_empty() { Some(self.primary) @@ -98,7 +98,7 @@ impl CursorRange { } } - /// returns the two ends ordered + /// Returns the two ends ordered. pub fn sorted_cursors(&self) -> [Cursor; 2] { if self.is_sorted() { [self.primary, self.secondary] diff --git a/crates/egui_demo_lib/src/demo/misc_demo_window.rs b/crates/egui_demo_lib/src/demo/misc_demo_window.rs index c0f98198..c45976d2 100644 --- a/crates/egui_demo_lib/src/demo/misc_demo_window.rs +++ b/crates/egui_demo_lib/src/demo/misc_demo_window.rs @@ -226,7 +226,7 @@ fn label_ui(ui: &mut egui::Ui) { ui.add( egui::Label::new( - "Labels containing long text can be set to elide the text that doesn't fit on a single line using `Label::elide`. When hovered, the label will show the full text.", + "Labels containing long text can be set to elide the text that doesn't fit on a single line using `Label::truncate`. When hovered, the label will show the full text.", ) .truncate(), ); diff --git a/crates/egui_demo_lib/src/demo/tooltips.rs b/crates/egui_demo_lib/src/demo/tooltips.rs index f40edd54..7daf14e8 100644 --- a/crates/egui_demo_lib/src/demo/tooltips.rs +++ b/crates/egui_demo_lib/src/demo/tooltips.rs @@ -63,7 +63,7 @@ impl super::View for Tooltips { }); }; let disabled_tooltip_ui = |ui: &mut egui::Ui| { - ui.label("A fifferent tooltip when widget is disabled."); + ui.label("A different tooltip when widget is disabled."); ui.horizontal(|ui| { ui.label("This tooltip was created with"); ui.code(".on_disabled_hover_ui(…)");