1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Check for typos on CI (#2918)

* Check for typos on CI

* Fix all typos
This commit is contained in:
Emil Ernerfeldt
2023-04-18 16:10:20 +02:00
committed by GitHub
parent 77df9cb982
commit 4809747952
22 changed files with 60 additions and 33 deletions

View File

@@ -522,7 +522,7 @@ impl EpiIntegration {
}
// ------------------------------------------------------------------------
// Persistance stuff:
// Persistence stuff:
pub fn maybe_autosave(&mut self, app: &mut dyn epi::App, window: &winit::window::Window) {
let now = std::time::Instant::now();

View File

@@ -291,11 +291,11 @@ impl AppRunner {
/// Get mutable access to the concrete [`App`] we enclose.
///
/// This will panic if your app does not implement [`App::as_any_mut`].
pub fn app_mut<ConreteApp: 'static + App>(&mut self) -> &mut ConreteApp {
pub fn app_mut<ConcreteApp: 'static + App>(&mut self) -> &mut ConcreteApp {
self.app
.as_any_mut()
.expect("Your app must implement `as_any_mut`, but it doesn't")
.downcast_mut::<ConreteApp>()
.downcast_mut::<ConcreteApp>()
.unwrap()
}

View File

@@ -2,7 +2,7 @@ use epaint::Shape;
use crate::{style::WidgetVisuals, *};
/// Indicate wether or not a popup will be shown above or below the box.
/// Indicate whether or not a popup will be shown above or below the box.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum AboveOrBelow {
Above,

View File

@@ -257,7 +257,7 @@ impl GridLayout {
/// A simple grid layout.
///
/// The cells are always layed out left to right, top-down.
/// The cells are always laid out left to right, top-down.
/// The contents of each cell will be aligned to the left and center.
///
/// If you want to add multiple widgets to a cell you need to group them with

View File

@@ -423,7 +423,7 @@ impl Painter {
self.fonts(|f| f.layout(text, font_id, color, f32::INFINITY))
}
/// Paint text that has already been layed out in a [`Galley`].
/// Paint text that has already been laid out in a [`Galley`].
///
/// You can create the [`Galley`] with [`Self::layout`].
///
@@ -435,7 +435,7 @@ impl Painter {
}
}
/// Paint text that has already been layed out in a [`Galley`].
/// Paint text that has already been laid out in a [`Galley`].
///
/// You can create the [`Galley`] with [`Self::layout`].
///

View File

@@ -508,7 +508,7 @@ pub struct Visuals {
/// Draw a vertical lien left of indented region, in e.g. [`crate::CollapsingHeader`].
pub indent_has_left_vline: bool,
/// Wether or not Grids and Tables should be striped by default
/// Whether or not Grids and Tables should be striped by default
/// (have alternating rows differently colored).
pub striped: bool,

View File

@@ -424,7 +424,7 @@ impl Ui {
/// # Sizes etc
impl Ui {
/// Where and how large the [`Ui`] is already.
/// All widgets that have been added ot this [`Ui`] fits within this rectangle.
/// All widgets that have been added to this [`Ui`] fits within this rectangle.
///
/// No matter what, the final Ui will be at least this large.
///

View File

@@ -344,7 +344,7 @@ impl RichText {
/// Often a [`WidgetText`] is just a simple [`String`],
/// but it can be a [`RichText`] (text with color, style, etc),
/// a [`LayoutJob`] (for when you want full control of how the text looks)
/// or text that has already been layed out in a [`Galley`].
/// or text that has already been laid out in a [`Galley`].
#[derive(Clone)]
pub enum WidgetText {
RichText(RichText),
@@ -662,7 +662,7 @@ impl WidgetTextJob {
// ----------------------------------------------------------------------------
/// Text that has been layed out and ready to be painted.
/// Text that has been laid out and ready to be painted.
#[derive(Clone, PartialEq)]
pub struct WidgetTextGalley {
pub galley: Arc<Galley>,
@@ -670,13 +670,13 @@ pub struct WidgetTextGalley {
}
impl WidgetTextGalley {
/// Size of the layed out text.
/// Size of the laid out text.
#[inline]
pub fn size(&self) -> crate::Vec2 {
self.galley.size()
}
/// Size of the layed out text.
/// Size of the laid out text.
#[inline]
pub fn text(&self) -> &str {
self.galley.text()

View File

@@ -69,7 +69,7 @@ fn about_immediate_mode(ui: &mut egui::Ui) {
ui.label("Note how there are no callbacks or messages, and no button state to store.");
ui.label("Immediate mode has its roots in gaming, where everything on the screen is painted at the display refresh rate, i.e. at 60+ frames per second. \
In immediate mode GUIs, the entire interface is layed out and painted at the same high rate. \
In immediate mode GUIs, the entire interface is laid out and painted at the same high rate. \
This makes immediate mode GUIs especially well suited for highly interactive applications.");
ui.horizontal_wrapped(|ui| {

View File

@@ -86,7 +86,7 @@ impl super::View for Scrolling {
fn huge_content_lines(ui: &mut egui::Ui) {
ui.label(
"A lot of rows, but only the visible ones are layed out, so performance is still good:",
"A lot of rows, but only the visible ones are laid out, so performance is still good:",
);
ui.add_space(4.0);

View File

@@ -2,7 +2,7 @@
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
enum DemoType {
Manual,
ManyHomogenous,
ManyHomogeneous,
ManyHeterogenous,
}
@@ -61,7 +61,7 @@ impl super::View for TableDemo {
ui.radio_value(&mut self.demo, DemoType::Manual, "Few, manual rows");
ui.radio_value(
&mut self.demo,
DemoType::ManyHomogenous,
DemoType::ManyHomogeneous,
"Thousands of rows of same height",
);
ui.radio_value(
@@ -179,7 +179,7 @@ impl TableDemo {
});
}
}
DemoType::ManyHomogenous => {
DemoType::ManyHomogeneous => {
body.rows(text_height, self.num_rows, |row_index, mut row| {
row.col(|ui| {
ui.label(row_index.to_string());

View File

@@ -52,7 +52,7 @@ impl super::View for IdTest {
ui.label("\
Widgets that store state require unique and persisting identifiers so we can track their state between frames.\n\
For instance, collapsable headers needs to store whether or not they are open. \
For instance, collapsible headers needs to store whether or not they are open. \
Their Id:s are derived from their names. \
If you fail to give them unique names then clicking one will open both. \
To help you debug this, an error message is printed on screen:");

View File

@@ -56,7 +56,7 @@ pub const LOREM_IPSUM: &str = "Lorem ipsum dolor sit amet, consectetur adipiscin
pub const LOREM_IPSUM_LONG: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.";
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam various, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida. Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula eu tempor congue, eros est euismod turpis, id tincidunt sapien risus a quam. Maecenas fermentum consequat mi. Donec fermentum. Pellentesque malesuada nulla a mi. Duis sapien sem, aliquet nec, commodo eget, consequat quis, neque. Aliquam faucibus, elit ut dictum aliquet, felis nisl adipiscing sapien, sed malesuada diam lacus eget erat. Cras mollis scelerisque nunc. Nullam arcu. Aliquam consequat. Curabitur augue lorem, dapibus quis, laoreet et, pretium ac, nisi. Aenean magna nisl, mollis quis, molestie eu, feugiat in, orci. In hac habitasse platea dictumst.";
// ----------------------------------------------------------------------------

View File

@@ -625,7 +625,7 @@ pub struct TextShape {
/// Top left corner of the first character.
pub pos: Pos2,
/// The layed out text, from [`Fonts::layout_job`].
/// The laid out text, from [`Fonts::layout_job`].
pub galley: Arc<Galley>,
/// Add this underline to the whole text.

View File

@@ -70,7 +70,7 @@ pub fn layout(fonts: &mut FontsImpl, job: Arc<LayoutJob>) -> Galley {
for (i, row) in rows.iter_mut().enumerate() {
let is_last_row = i + 1 == num_rows;
let justify_row = justify && !row.ends_with_newline && !is_last_row;
halign_and_jusitfy_row(
halign_and_justify_row(
point_scale,
row,
job.halign,
@@ -337,7 +337,7 @@ fn replace_last_glyph_with_overflow_character(
}
}
fn halign_and_jusitfy_row(
fn halign_and_justify_row(
point_scale: PointScale,
row: &mut Row,
halign: Align,

View File

@@ -850,7 +850,7 @@ impl Galley {
// keep same X coord
let x = self.pos_from_cursor(cursor).center().x;
let column = if x > self.rows[new_row].rect.right() {
// beyond the end of this row - keep same colum
// beyond the end of this row - keep same column
cursor.rcursor.column
} else {
self.rows[new_row].char_at(x)