mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Fix typos (#2866)
* Fix typos in comments * Fix typos in demo texts * Fix typos in code names * Fix typos in cargos * Fix typos in changelogs
This commit is contained in:
@@ -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.
|
||||
@@ -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).
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)]
|
||||
@@ -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>;
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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(
|
||||
@@ -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(
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user