summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar bbb651 <bar.ye651@gmail.com>2024-09-29 16:37:35 +0300
committerLibravatar bbb651 <bar.ye651@gmail.com>2024-09-29 16:37:35 +0300
commit7a86900a45116994a4a175c8979550b28ec0dcfb (patch)
tree4318ba0219282b246606b37c2344ac4efb5323a3
parentafecc0f367aff12fa353c8158fac3098ffe40136 (diff)
downloadiced-7a86900a45116994a4a175c8979550b28ec0dcfb.tar.gz
iced-7a86900a45116994a4a175c8979550b28ec0dcfb.tar.bz2
iced-7a86900a45116994a4a175c8979550b28ec0dcfb.zip
Fix various typos
Using https://github.com/crate-ci/typos
-rw-r--r--core/src/keyboard/key.rs2
-rw-r--r--core/src/keyboard/modifiers.rs2
-rw-r--r--core/src/text.rs4
-rw-r--r--graphics/src/compositor.rs2
-rw-r--r--runtime/src/system.rs2
-rw-r--r--runtime/src/window.rs2
-rw-r--r--widget/src/button.rs4
-rw-r--r--widget/src/checkbox.rs4
-rw-r--r--widget/src/combo_box.rs4
-rw-r--r--widget/src/markdown.rs4
-rw-r--r--widget/src/text/rich.rs2
11 files changed, 16 insertions, 16 deletions
diff --git a/core/src/keyboard/key.rs b/core/src/keyboard/key.rs
index 479d999b..69a91902 100644
--- a/core/src/keyboard/key.rs
+++ b/core/src/keyboard/key.rs
@@ -203,7 +203,7 @@ pub enum Named {
Standby,
/// The WakeUp key. (`KEYCODE_WAKEUP`)
WakeUp,
- /// Initate the multi-candidate mode.
+ /// Initiate the multi-candidate mode.
AllCandidates,
Alphanumeric,
/// Initiate the Code Input mode to allow characters to be entered by
diff --git a/core/src/keyboard/modifiers.rs b/core/src/keyboard/modifiers.rs
index edbf6d38..00b31882 100644
--- a/core/src/keyboard/modifiers.rs
+++ b/core/src/keyboard/modifiers.rs
@@ -33,7 +33,7 @@ impl Modifiers {
/// This is normally the main modifier to be used for hotkeys.
///
/// On macOS, this is equivalent to `Self::LOGO`.
- /// Ohterwise, this is equivalent to `Self::CTRL`.
+ /// Otherwise, this is equivalent to `Self::CTRL`.
pub const COMMAND: Self = if cfg!(target_os = "macos") {
Self::LOGO
} else {
diff --git a/core/src/text.rs b/core/src/text.rs
index d7b7fee4..a9e3dce5 100644
--- a/core/src/text.rs
+++ b/core/src/text.rs
@@ -411,13 +411,13 @@ impl<'a, Link, Font> Span<'a, Link, Font> {
self
}
- /// Sets whether the [`Span`] shoud be underlined or not.
+ /// Sets whether the [`Span`] should be underlined or not.
pub fn underline(mut self, underline: bool) -> Self {
self.underline = underline;
self
}
- /// Sets whether the [`Span`] shoud be struck through or not.
+ /// Sets whether the [`Span`] should be struck through or not.
pub fn strikethrough(mut self, strikethrough: bool) -> Self {
self.strikethrough = strikethrough;
self
diff --git a/graphics/src/compositor.rs b/graphics/src/compositor.rs
index 47521eb0..3026bead 100644
--- a/graphics/src/compositor.rs
+++ b/graphics/src/compositor.rs
@@ -155,7 +155,7 @@ impl Compositor for () {
async fn with_backend<W: Window + Clone>(
_settings: Settings,
_compatible_window: W,
- _preffered_backend: Option<&str>,
+ _preferred_backend: Option<&str>,
) -> Result<Self, Error> {
Ok(())
}
diff --git a/runtime/src/system.rs b/runtime/src/system.rs
index b6fb4fdf..8b0ec2d8 100644
--- a/runtime/src/system.rs
+++ b/runtime/src/system.rs
@@ -8,7 +8,7 @@ pub enum Action {
QueryInformation(oneshot::Sender<Information>),
}
-/// Contains informations about the system (e.g. system name, processor, memory, graphics adapter).
+/// Contains information about the system (e.g. system name, processor, memory, graphics adapter).
#[derive(Clone, Debug)]
pub struct Information {
/// The operating system name
diff --git a/runtime/src/window.rs b/runtime/src/window.rs
index 27035d7d..382f4518 100644
--- a/runtime/src/window.rs
+++ b/runtime/src/window.rs
@@ -220,7 +220,7 @@ pub fn resize_events() -> Subscription<(Id, Size)> {
})
}
-/// Subscribes to all [`Event::CloseRequested`] occurences in the running application.
+/// Subscribes to all [`Event::CloseRequested`] occurrences in the running application.
pub fn close_requests() -> Subscription<Id> {
event::listen_with(|event, _status, id| {
if let crate::core::Event::Window(Event::CloseRequested) = event {
diff --git a/widget/src/button.rs b/widget/src/button.rs
index 3323c0d3..552298bb 100644
--- a/widget/src/button.rs
+++ b/widget/src/button.rs
@@ -477,9 +477,9 @@ pub struct Style {
pub background: Option<Background>,
/// The text [`Color`] of the button.
pub text_color: Color,
- /// The [`Border`] of the buton.
+ /// The [`Border`] of the button.
pub border: Border,
- /// The [`Shadow`] of the butoon.
+ /// The [`Shadow`] of the button.
pub shadow: Shadow,
}
diff --git a/widget/src/checkbox.rs b/widget/src/checkbox.rs
index 4a3f35ed..4b2f6075 100644
--- a/widget/src/checkbox.rs
+++ b/widget/src/checkbox.rs
@@ -487,7 +487,7 @@ pub struct Style {
pub background: Background,
/// The icon [`Color`] of the checkbox.
pub icon_color: Color,
- /// The [`Border`] of hte checkbox.
+ /// The [`Border`] of the checkbox.
pub border: Border,
/// The text [`Color`] of the checkbox.
pub text_color: Option<Color>,
@@ -600,7 +600,7 @@ pub fn success(theme: &Theme, status: Status) -> Style {
}
}
-/// A danger checkbox; denoting a negaive toggle.
+/// A danger checkbox; denoting a negative toggle.
pub fn danger(theme: &Theme, status: Status) -> Style {
let palette = theme.extended_palette();
diff --git a/widget/src/combo_box.rs b/widget/src/combo_box.rs
index fb661ad5..e300f1d0 100644
--- a/widget/src/combo_box.rs
+++ b/widget/src/combo_box.rs
@@ -608,8 +608,8 @@ where
..
}) = event
{
- let shift_modifer = modifiers.shift();
- match (named_key, shift_modifer) {
+ let shift_modifier = modifiers.shift();
+ match (named_key, shift_modifier) {
(key::Named::Enter, _) => {
if let Some(index) = &menu.hovered_option {
if let Some(option) =
diff --git a/widget/src/markdown.rs b/widget/src/markdown.rs
index 8adc368c..d3f88310 100644
--- a/widget/src/markdown.rs
+++ b/widget/src/markdown.rs
@@ -1,6 +1,6 @@
//! Markdown widgets can parse and display Markdown.
//!
-//! You can enable the `highlighter` feature for syntax highligting
+//! You can enable the `highlighter` feature for syntax highlighting
//! in code blocks.
//!
//! Only the variants of [`Item`] are currently supported.
@@ -72,7 +72,7 @@ pub enum Item {
Paragraph(Text),
/// A code block.
///
- /// You can enable the `highlighter` feature for syntax highligting.
+ /// You can enable the `highlighter` feature for syntax highlighting.
CodeBlock(Text),
/// A list.
List {
diff --git a/widget/src/text/rich.rs b/widget/src/text/rich.rs
index 921c55a5..3d241375 100644
--- a/widget/src/text/rich.rs
+++ b/widget/src/text/rich.rs
@@ -72,7 +72,7 @@ where
self
}
- /// Sets the defualt [`LineHeight`] of the [`Rich`] text.
+ /// Sets the default [`LineHeight`] of the [`Rich`] text.
pub fn line_height(mut self, line_height: impl Into<LineHeight>) -> Self {
self.line_height = line_height.into();
self