Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Wayland File* Events as Unsupported & Fix Typos #2615

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/keyboard/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/src/keyboard/modifiers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions core/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions core/src/window/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,29 @@ pub enum Event {
///
/// When the user hovers multiple files at once, this event will be emitted
/// for each file separately.
///
/// ## Platform-specific
///
/// - **Wayland:** Not implemented.
FileHovered(PathBuf),

/// A file has been dropped into the window.
///
/// When the user drops multiple files at once, this event will be emitted
/// for each file separately.
///
/// ## Platform-specific
///
/// - **Wayland:** Not implemented.
FileDropped(PathBuf),

/// A file was hovered, but has exited the window.
///
/// There will be a single `FilesHoveredLeft` event triggered even if
/// multiple files were hovered.
///
/// ## Platform-specific
///
/// - **Wayland:** Not implemented.
FilesHoveredLeft,
}
2 changes: 1 addition & 1 deletion graphics/src/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions widget/src/button.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
4 changes: 2 additions & 2 deletions widget/src/checkbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions widget/src/combo_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
Expand Down
4 changes: 2 additions & 2 deletions widget/src/markdown.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion widget/src/text/rich.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading