Skip to content

Commit

Permalink
Fix typos (#2866)
Browse files Browse the repository at this point in the history
* Fix typos in comments

* Fix typos in demo texts

* Fix typos in code names

* Fix typos in cargos

* Fix typos in changelogs
  • Loading branch information
fezjo authored Apr 18, 2023
1 parent 8326fff commit 33aa4d6
Show file tree
Hide file tree
Showing 30 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion crates/ecolor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extra_asserts = []
## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast `ecolor` types to `&[u8]`.
bytemuck = { version = "1.7.2", optional = true, features = ["derive"] }

## [`cint`](https://docs.rs/cint) enables interopability with other color libraries.
## [`cint`](https://docs.rs/cint) enables interoperability with other color libraries.
cint = { version = "0.3.1", optional = true }

## Enable the [`hex_color`] macro.
Expand Down
2 changes: 1 addition & 1 deletion crates/eframe/src/native/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ mod glow_integration {
}

impl GlutinWindowContext {
/// There is a lot of complexity with opengl creation, so prefer extensivve logging to get all the help we can to debug issues.
/// There is a lot of complexity with opengl creation, so prefer extensive logging to get all the help we can to debug issues.
///
#[allow(unsafe_code)]
unsafe fn new(
Expand Down
2 changes: 1 addition & 1 deletion crates/egui-wgpu/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ All notable changes to the `egui-wgpu` integration will be noted in this file.


## Unreleased
* Add `read_screan_rgba` to the egui-wgpu `Painter`, to allow for capturing the current frame when using wgpu. Used in conjuction with `Frame::request_screenshot`. ([#2676](https://github.com/emilk/egui/pull/2676))
* Add `read_screen_rgba` to the egui-wgpu `Painter`, to allow for capturing the current frame when using wgpu. Used in conjunction with `Frame::request_screenshot`. ([#2676](https://github.com/emilk/egui/pull/2676))
* Improve performance of `update_buffers` ([#2820](https://github.com/emilk/egui/pull/2820))
* Added support for multisampling (MSAA) ([#2878](https://github.com/emilk/egui/pull/2878))

Expand Down
2 changes: 1 addition & 1 deletion crates/egui-wgpu/src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ fn create_index_buffer(device: &wgpu::Device, size: u64) -> wgpu::Buffer {
})
}

/// A Rect in physical pixel space, used for setting cliipping rectangles.
/// A Rect in physical pixel space, used for setting clipping rectangles.
struct ScissorRect {
x: u32,
y: u32,
Expand Down
2 changes: 1 addition & 1 deletion crates/egui-winit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ All notable changes to the `egui-winit` integration will be noted in this file.

## 0.17.0 - 2022-02-22
* Fixed horizontal scrolling direction on Linux.
* Replaced `std::time::Instant` with `instant::Instant` for WebAssembly compatability ([#1023](https://github.com/emilk/egui/pull/1023))
* Replaced `std::time::Instant` with `instant::Instant` for WebAssembly compatibility ([#1023](https://github.com/emilk/egui/pull/1023))
* Automatically detect and apply dark or light mode from system ([#1045](https://github.com/emilk/egui/pull/1045)).
* Fixed `enable_drag` on Windows OS ([#1108](https://github.com/emilk/egui/pull/1108)).
* Shift-scroll will now result in horizontal scrolling on all platforms ([#1136](https://github.com/emilk/egui/pull/1136)).
Expand Down
6 changes: 3 additions & 3 deletions crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ impl State {
}
}
WindowEvent::Ime(ime) => {
// on Mac even Cmd-C is preessed during ime, a `c` is pushed to Preedit.
// on Mac even Cmd-C is pressed during ime, a `c` is pushed to Preedit.
// So no need to check is_mac_cmd.
//
// How winit produce `Ime::Enabled` and `Ime::Disabled` differs in MacOS
Expand All @@ -279,7 +279,7 @@ impl State {
// - On MacOS, only when user explicit enable/disable ime. No Disabled
// after Commit.
//
// We use input_method_editor_started to mannualy insert CompositionStart
// We use input_method_editor_started to manually insert CompositionStart
// between Commits.
match ime {
winit::event::Ime::Enabled | winit::event::Ime::Disabled => (),
Expand Down Expand Up @@ -510,7 +510,7 @@ impl State {
None => 0_f32,
},
});
// If we're not yet tanslating a touch or we're translating this very
// If we're not yet translating a touch or we're translating this very
// touch …
if self.pointer_touch_id.is_none() || self.pointer_touch_id.unwrap() == touch.id {
// … emit PointerButton resp. PointerMoved events to emulate mouse
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ default = ["default_fonts"]
## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast [`epaint::Vertex`], [`emath::Vec2`] etc to `&[u8]`.
bytemuck = ["epaint/bytemuck"]

## [`cint`](https://docs.rs/cint) enables interopability with other color libraries.
## [`cint`](https://docs.rs/cint) enables interoperability with other color libraries.
cint = ["epaint/cint"]

## Enable the [`hex_color`] macro.
Expand All @@ -45,7 +45,7 @@ extra_debug_asserts = ["epaint/extra_debug_asserts"]
## Always enable additional checks.
extra_asserts = ["epaint/extra_asserts"]

## [`mint`](https://docs.rs/mint) enables interopability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra).
## [`mint`](https://docs.rs/mint) enables interoperability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra).
mint = ["epaint/mint"]

## Enable persistence of memory (window positions etc).
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/containers/panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ impl SidePanel {
} else if resize_hover {
ui.style().visuals.widgets.hovered.fg_stroke // highly visible
} else if show_separator_line {
// TOOD(emilk): distinguish resizable from non-resizable
// TODO(emilk): distinguish resizable from non-resizable
ui.style().visuals.widgets.noninteractive.bg_stroke // dim
} else {
Stroke::NONE
Expand Down Expand Up @@ -752,7 +752,7 @@ impl TopBottomPanel {
} else if resize_hover {
ui.style().visuals.widgets.hovered.fg_stroke // highly visible
} else if show_separator_line {
// TOOD(emilk): distinguish resizable from non-resizable
// TODO(emilk): distinguish resizable from non-resizable
ui.style().visuals.widgets.noninteractive.bg_stroke // dim
} else {
Stroke::NONE
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl ContextImpl {
///
/// ``` no_run
/// # fn handle_platform_output(_: egui::PlatformOutput) {}
/// # fn paint(textures_detla: egui::TexturesDelta, _: Vec<egui::ClippedPrimitive>) {}
/// # fn paint(textures_delta: egui::TexturesDelta, _: Vec<egui::ClippedPrimitive>) {}
/// let mut ctx = egui::Context::default();
///
/// // Game loop:
Expand Down Expand Up @@ -890,7 +890,7 @@ impl Context {
/// Duration begins at the next frame. lets say for example that its a very inefficient app
/// and takes 500 milliseconds per frame at 2 fps. The widget / user might want a repaint in
/// next 500 milliseconds. Now, app takes 1000 ms per frame (1 fps) because the backend event
/// timeout takes 500 milli seconds AFTER the vsync swap buffer.
/// timeout takes 500 milliseconds AFTER the vsync swap buffer.
/// So, its not that we are requesting repaint within X duration. We are rather timing out
/// during app idle time where we are not receiving any new input events.
pub fn request_repaint_after(&self, duration: std::time::Duration) {
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/data/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl PlatformOutput {
/// Take everything ephemeral (everything except `cursor_icon` currently)
pub fn take(&mut self) -> Self {
let taken = std::mem::take(self);
self.cursor_icon = taken.cursor_icon; // eveything else is ephemeral
self.cursor_icon = taken.cursor_icon; // everything else is ephemeral
taken
}
}
Expand Down
8 changes: 4 additions & 4 deletions crates/egui/src/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ impl std::hash::Hasher for IdHasher {

#[derive(Copy, Clone, Debug, Default)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
pub struct BuilIdHasher {}
pub struct BuildIdHasher {}

impl std::hash::BuildHasher for BuilIdHasher {
impl std::hash::BuildHasher for BuildIdHasher {
type Hasher = IdHasher;

#[inline(always)]
Expand All @@ -169,7 +169,7 @@ impl std::hash::BuildHasher for BuilIdHasher {
}

/// `IdSet` is a `HashSet<Id>` optimized by knowing that [`Id`] has good entropy, and doesn't need more hashing.
pub type IdSet = std::collections::HashSet<Id, BuilIdHasher>;
pub type IdSet = std::collections::HashSet<Id, BuildIdHasher>;

/// `IdMap<V>` is a `HashMap<Id, V>` optimized by knowing that [`Id`] has good entropy, and doesn't need more hashing.
pub type IdMap<V> = std::collections::HashMap<Id, V, BuilIdHasher>;
pub type IdMap<V> = std::collections::HashMap<Id, V, BuildIdHasher>;
2 changes: 1 addition & 1 deletion crates/egui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
//! ``` no_run
//! # fn handle_platform_output(_: egui::PlatformOutput) {}
//! # fn gather_input() -> egui::RawInput { egui::RawInput::default() }
//! # fn paint(textures_detla: egui::TexturesDelta, _: Vec<egui::ClippedPrimitive>) {}
//! # fn paint(textures_delta: egui::TexturesDelta, _: Vec<egui::ClippedPrimitive>) {}
//! let mut ctx = egui::Context::default();
//!
//! // Game loop:
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ impl DebugOptions {

ui.checkbox(
show_blocking_widget,
"Show wha widget blocks the interaction of another widget",
"Show which widget blocks the interaction of another widget",
);

ui.vertical_centered(|ui| reset_button(ui, self));
Expand Down
6 changes: 3 additions & 3 deletions crates/egui/src/widgets/slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ fn value_from_normalized(normalized: f64, range: RangeInclusive<f64>, spec: &Sli
10.0_f64.powf(log)
} else {
assert!(min < 0.0 && 0.0 < max);
let zero_cutoff = logaritmic_zero_cutoff(min, max);
let zero_cutoff = logarithmic_zero_cutoff(min, max);
if normalized < zero_cutoff {
// negative
value_from_normalized(
Expand Down Expand Up @@ -941,7 +941,7 @@ fn normalized_from_value(value: f64, range: RangeInclusive<f64>, spec: &SliderSp
remap_clamp(value_log, min_log..=max_log, 0.0..=1.0)
} else {
assert!(min < 0.0 && 0.0 < max);
let zero_cutoff = logaritmic_zero_cutoff(min, max);
let zero_cutoff = logarithmic_zero_cutoff(min, max);
if value < 0.0 {
// negative
remap(
Expand Down Expand Up @@ -992,7 +992,7 @@ fn range_log10(min: f64, max: f64, spec: &SliderSpec) -> (f64, f64) {

/// where to put the zero cutoff for logarithmic sliders
/// that crosses zero ?
fn logaritmic_zero_cutoff(min: f64, max: f64) -> f64 {
fn logarithmic_zero_cutoff(min: f64, max: f64) -> f64 {
assert!(min < 0.0 && 0.0 < max);

let min_magnitude = if min == -INFINITY {
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/widgets/text_edit/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ fn events(
let mut ccursor = delete_selected(text, &cursor_range);
if modifiers.shift {
// TODO(emilk): support removing indentation over a selection?
decrease_identation(&mut ccursor, text);
decrease_indentation(&mut ccursor, text);
} else {
insert_text(&mut ccursor, text, "\t", char_limit);
}
Expand Down Expand Up @@ -1619,7 +1619,7 @@ fn find_line_start(text: &str, current_index: CCursor) -> CCursor {
}
}

fn decrease_identation(ccursor: &mut CCursor, text: &mut dyn TextBuffer) {
fn decrease_indentation(ccursor: &mut CCursor, text: &mut dyn TextBuffer) {
let line_start = find_line_start(text.as_str(), *ccursor);

let remove_len = if text.as_str()[line_start.index..].starts_with('\t') {
Expand Down
2 changes: 1 addition & 1 deletion crates/egui_demo_app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl WebHandle {
}

#[wasm_bindgen]
pub fn set_some_content_from_javasript(&mut self, _some_data: &str) {
pub fn set_some_content_from_javascript(&mut self, _some_data: &str) {
let _app = self.handle.lock().app_mut::<WrapApp>();
// _app.data = some_data;
}
Expand Down
2 changes: 1 addition & 1 deletion crates/egui_demo_lib/src/color_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl ColorTest {
ui.horizontal_wrapped(|ui|{
ui.label("This is made to test that the egui painter backend is set up correctly.");
ui.add(egui::Label::new("❓").sense(egui::Sense::click()))
.on_hover_text("The texture sampling should be sRGB-aware, and everyt other color operation should be done in gamma-space (sRGB). All colors should use pre-multiplied alpha");
.on_hover_text("The texture sampling should be sRGB-aware, and every other color operation should be done in gamma-space (sRGB). All colors should use pre-multiplied alpha");
});
ui.label("If the rendering is done right, all groups of gradients will look uniform.");

Expand Down
2 changes: 1 addition & 1 deletion crates/egui_demo_lib/src/demo/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl super::View for IdTest {
As long as elements are not added or removed, the Id stays the same. \
This is fine, because during interaction (i.e. while dragging a slider), \
the number of widgets previously in the same window is most likely not changing \
(and if it is, the window will have a new layout, and the slider will endup somewhere else, and so aborthing the interaction probably makes sense).");
(and if it is, the window will have a new layout, and the slider will end up somewhere else, and so aborting the interaction probably makes sense).");

ui.label("So these buttons have automatic Id:s, and therefore there is no name clash:");
let _ = ui.button("Button");
Expand Down
6 changes: 3 additions & 3 deletions crates/egui_extras/src/datepicker/popup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl<'a> DatePickerPopup<'a> {
ui.with_layout(Layout::top_down_justified(Align::Center), |ui| {
if ui
.button("<<<")
.on_hover_text("substract one year")
.on_hover_text("subtract one year")
.clicked()
{
popup_state.year -= 1;
Expand All @@ -171,7 +171,7 @@ impl<'a> DatePickerPopup<'a> {
ui.with_layout(Layout::top_down_justified(Align::Center), |ui| {
if ui
.button("<<")
.on_hover_text("substract one month")
.on_hover_text("subtract one month")
.clicked()
{
popup_state.month -= 1;
Expand All @@ -189,7 +189,7 @@ impl<'a> DatePickerPopup<'a> {
});
strip.cell(|ui| {
ui.with_layout(Layout::top_down_justified(Align::Center), |ui| {
if ui.button("<").on_hover_text("substract one day").clicked() {
if ui.button("<").on_hover_text("subtract one day").clicked() {
popup_state.day -= 1;
if popup_state.day == 0 {
popup_state.month -= 1;
Expand Down
2 changes: 1 addition & 1 deletion crates/egui_glium/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ All notable changes to the `egui_glium` integration will be noted in this file.


## 0.13.0 - 2021-06-24
* Added `EguiGlium::is_quit_event` to replace `control_flow` arguemnt to `EguiGlium::on_event`.
* Added `EguiGlium::is_quit_event` to replace `control_flow` argument to `EguiGlium::on_event`.
* [Fix modifier key for zoom with mouse wheel on Mac](https://github.com/emilk/egui/issues/401)
* [Fix stuck modifier keys](https://github.com/emilk/egui/pull/479)

Expand Down
2 changes: 1 addition & 1 deletion crates/egui_glow/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ All notable changes to the `egui_glow` integration will be noted in this file.

## 0.20.0 - 2022-12-08
* Allow empty textures.
* Added `shader_version` variable on `EguiGlow::new` for easier cross compilling on different OpenGL | ES targets ([#1993](https://github.com/emilk/egui/pull/1993)).
* Added `shader_version` variable on `EguiGlow::new` for easier cross compiling on different OpenGL | ES targets ([#1993](https://github.com/emilk/egui/pull/1993)).


## 0.19.0 - 2022-08-20
Expand Down
2 changes: 1 addition & 1 deletion crates/egui_web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Contributors: [n2](https://github.com/n2)
### Added ⭐
* A simple HTTP fetch API (wraps `web_sys`).
* Added ability to request a repaint
* Copy/cut/paste suppoert
* Copy/cut/paste support

### Changed 🔧
* Automatic repaint every second
Expand Down
2 changes: 1 addition & 1 deletion crates/emath/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bytemuck = { version = "1.7.2", optional = true, features = ["derive"] }
## Enable this when generating docs.
document-features = { version = "0.2", optional = true }

## [`mint`](https://docs.rs/mint) enables interopability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra).
## [`mint`](https://docs.rs/mint) enables interoperability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra).
mint = { version = "0.5.6", optional = true }

## Allow serialization using [`serde`](https://docs.rs/serde).
Expand Down
4 changes: 2 additions & 2 deletions crates/epaint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ default = ["default_fonts"]
## [`bytemuck`](https://docs.rs/bytemuck) enables you to cast [`Vertex`] to `&[u8]`.
bytemuck = ["dep:bytemuck", "emath/bytemuck", "ecolor/bytemuck"]

## [`cint`](https://docs.rs/cint) enables interopability with other color libraries.
## [`cint`](https://docs.rs/cint) enables interoperability with other color libraries.
cint = ["ecolor/cint"]

## Enable the [`hex_color`] macro.
Expand All @@ -57,7 +57,7 @@ extra_debug_asserts = [
## Always enable additional checks.
extra_asserts = ["emath/extra_asserts", "ecolor/extra_asserts"]

## [`mint`](https://docs.rs/mint) enables interopability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra).
## [`mint`](https://docs.rs/mint) enables interoperability with other math libraries such as [`glam`](https://docs.rs/glam) and [`nalgebra`](https://docs.rs/nalgebra).
mint = ["emath/mint"]

## Allow serialization using [`serde`](https://docs.rs/serde).
Expand Down
4 changes: 2 additions & 2 deletions crates/epaint/src/bezier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ mod tests {
}

#[test]
fn test_quadratic_dfferent_tolerance() {
fn test_quadratic_different_tolerance() {
let curve = QuadraticBezierShape {
points: [
Pos2 { x: 110.0, y: 170.0 },
Expand Down Expand Up @@ -1079,7 +1079,7 @@ mod tests {
}

#[test]
fn test_quadrtic_flattening() {
fn test_quadratic_flattening() {
let curve = QuadraticBezierShape {
points: [pos2(0.0, 0.0), pos2(80.0, 200.0), pos2(100.0, 30.0)],
closed: false,
Expand Down
4 changes: 2 additions & 2 deletions crates/epaint/src/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ mod rw_lock_impl {
pub fn read(&self) -> RwLockReadGuard<'_, T> {
let tid = std::thread::current().id();

// If it is write-locked, and we locked it (re-entrancy deadlock)
// If it is write-locked, and we locked it (reentrancy deadlock)
let would_deadlock =
self.lock.is_locked_exclusive() && self.holders.lock().contains_key(&tid);
assert!(
Expand Down Expand Up @@ -291,7 +291,7 @@ mod rw_lock_impl {
pub fn write(&self) -> RwLockWriteGuard<'_, T> {
let tid = std::thread::current().id();

// If it is locked in any way, and we locked it (re-entrancy deadlock)
// If it is locked in any way, and we locked it (reentrancy deadlock)
let would_deadlock = self.lock.is_locked() && self.holders.lock().contains_key(&tid);
assert!(
!would_deadlock,
Expand Down
6 changes: 3 additions & 3 deletions crates/epaint/src/shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ impl Shape {
bezier_shape.points[1] += delta;
bezier_shape.points[2] += delta;
}
Shape::CubicBezier(cubie_curve) => {
for p in &mut cubie_curve.points {
Shape::CubicBezier(cubic_curve) => {
for p in &mut cubic_curve.points {
*p += delta;
}
}
Expand Down Expand Up @@ -808,7 +808,7 @@ pub struct PaintCallback {
/// `glow` backend requires that callback be an `egui_glow::CallbackFn` while the `wgpu`
/// backend requires a `egui_wgpu::CallbackFn`.
///
/// If the type cannnot be downcast to the type expected by the current backend the callback
/// If the type cannot be downcast to the type expected by the current backend the callback
/// will not be drawn.
///
/// The rendering backend is responsible for first setting the active viewport to
Expand Down
Loading

0 comments on commit 33aa4d6

Please sign in to comment.