From 51b370ef48faf81eb003ecad0495d76976c168ec Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 18 Oct 2024 17:42:35 -0600 Subject: [PATCH] Fix doc links --- core/src/overlay.rs | 3 ++- runtime/src/lib.rs | 9 +++++---- widget/src/button.rs | 2 +- widget/src/overlay/menu.rs | 2 +- widget/src/pick_list.rs | 2 +- winit/src/platform_specific/wayland/sctk_event.rs | 13 +++++++------ 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/core/src/overlay.rs b/core/src/overlay.rs index 67628d98..7b24f4b5 100644 --- a/core/src/overlay.rs +++ b/core/src/overlay.rs @@ -10,6 +10,7 @@ pub use nested::Nested; use crate::layout; use crate::mouse; use crate::renderer; +use crate::widget::Operation; use crate::widget::Tree; use crate::{Clipboard, Event, Layout, Rectangle, Shell, Size, Vector}; @@ -41,7 +42,7 @@ where &mut self, _layout: Layout<'_>, _renderer: &Renderer, - _operation: &mut dyn crate::widget::Operation, + _operation: &mut dyn Operation, ) { } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 68c0d455..f165371a 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -28,6 +28,7 @@ pub use task::Task; pub use user_interface::UserInterface; pub use window::Window; +use crate::core::Color; use crate::futures::futures::channel::oneshot; use std::borrow::Cow; @@ -143,13 +144,13 @@ pub fn exit() -> Task { #[derive(Debug, Clone, Copy, PartialEq)] pub struct Appearance { /// The background [`Color`] of the application. - pub background_color: iced_core::Color, + pub background_color: Color, /// The default text [`Color`] of the application. - pub text_color: iced_core::Color, + pub text_color: Color, /// The default icon [`Color`] of the application. - pub icon_color: iced_core::Color, + pub icon_color: Color, } /// The default style of a [`Program`]. @@ -164,7 +165,7 @@ impl DefaultStyle for iced_core::Theme { } } -/// The default [`Appearance`] of a [`Program`] with the built-in [`Theme`]. +/// The default [`Appearance`] of a [`Program`] with the built-in [`iced_core::Theme`]. pub fn default(theme: &iced_core::Theme) -> Appearance { let palette = theme.extended_palette(); diff --git a/widget/src/button.rs b/widget/src/button.rs index b284f5d6..74490da8 100644 --- a/widget/src/button.rs +++ b/widget/src/button.rs @@ -972,7 +972,7 @@ fn disabled(style: Style) -> Style { } } -/// Produces a [`Command`] that focuses the [`Button`] with the given [`Id`]. +/// Produces a [`Task`] that focuses the [`Button`] with the given [`Id`]. pub fn focus(id: Id) -> Task { task::widget(operation::focusable::focus(id)) } diff --git a/widget/src/overlay/menu.rs b/widget/src/overlay/menu.rs index b5845e23..364641ce 100644 --- a/widget/src/overlay/menu.rs +++ b/widget/src/overlay/menu.rs @@ -113,7 +113,7 @@ where self } - /// Sets the [`text::Wrap`] mode of the [`Menu`]. + /// Sets the [`text::Wrapping`] mode of the [`Menu`]. pub fn text_wrap(mut self, wrap: text::Wrapping) -> Self { self.text_wrap = wrap; self diff --git a/widget/src/pick_list.rs b/widget/src/pick_list.rs index 4e36db99..7e147b4b 100644 --- a/widget/src/pick_list.rs +++ b/widget/src/pick_list.rs @@ -263,7 +263,7 @@ where self } - /// Sets the [`text::Wrap`] mode of the [`PickList`]. + /// Sets the [`text::Wrapping`] mode of the [`PickList`]. pub fn text_wrap(mut self, wrap: text::Wrapping) -> Self { self.text_wrap = wrap; self diff --git a/winit/src/platform_specific/wayland/sctk_event.rs b/winit/src/platform_specific/wayland/sctk_event.rs index 9d6f36fd..dacc2c86 100755 --- a/winit/src/platform_specific/wayland/sctk_event.rs +++ b/winit/src/platform_specific/wayland/sctk_event.rs @@ -87,8 +87,9 @@ pub enum IcedSctkEvent { /// /// This event type is useful as a place to put code that should be done before you start /// processing events, such as updating frame timing information for benchmarking or checking - /// the [`StartCause`][crate::event::StartCause] to see if a timer set by - /// [`ControlFlow::WaitUntil`](crate::platform_specific::wayland::event_loop::ControlFlow::WaitUntil) has elapsed. + /// the [`StartCause`] to see if a timer set by + /// [`ControlFlow::WaitUntil`](crate::platform_specific::wayland::event_loop::control_flow::ControlFlow::WaitUntil) + /// has elapsed. NewEvents(StartCause), /// An event produced by sctk @@ -101,7 +102,7 @@ pub enum IcedSctkEvent { /// state-changing events have been handled and you want to do stuff (updating state, performing /// calculations, etc) that happens as the "main body" of your event loop. If your program only draws /// graphics when something changes, it's usually better to do it in response to - /// [`Event::RedrawRequested`](crate::event::Event::RedrawRequested), which gets emitted + /// [`window::RedrawRequest`], which gets emitted /// immediately after this event. Programs that draw graphics continuously, like most games, /// can render here unconditionally for simplicity. MainEventsCleared, @@ -111,7 +112,7 @@ pub enum IcedSctkEvent { /// This gets triggered in two scenarios: /// - The OS has performed an operation that's invalidated the window's contents (such as /// resizing the window). - /// - The application has explicitly requested a redraw via [`Window::request_redraw`]. + /// - The application has explicitly requested a redraw via [`iced_runtime::core::Shell::request_redraw`]. /// /// During each iteration of the event loop, Winit will aggregate duplicate redraw requests /// into a single event, to help avoid duplicating rendering work. @@ -330,7 +331,7 @@ pub enum StartCause { /// moment the timeout was requested and the requested resume time. The actual resume time is /// guaranteed to be equal to or after the requested resume time. /// - /// [`ControlFlow::WaitUntil`]: crate::platform_specific::wayland::event_loop::ControlFlow::WaitUntil + /// [`ControlFlow::WaitUntil`]: crate::platform_specific::wayland::event_loop::control_flow::ControlFlow::WaitUntil ResumeTimeReached { start: Instant, requested_resume: Instant, @@ -346,7 +347,7 @@ pub enum StartCause { /// Sent if the event loop is being resumed after the loop's control flow was set to /// [`ControlFlow::Poll`]. /// - /// [`ControlFlow::Poll`]: crate::platform_specific::wayland::event_loop::ControlFlow::Poll + /// [`ControlFlow::Poll`]: crate::platform_specific::wayland::event_loop::control_flow::ControlFlow::Poll Poll, /// Sent once, immediately after `run` is called. Indicates that the loop was just initialized.