-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9c7c3c
commit d623bb0
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#[doc(inline)] | ||
pub use iced::widget::{image, image::*, Image}; | ||
|
||
#[cfg(feature = "winit")] | ||
use { | ||
crate::app::Task, | ||
iced_accessibility::Id, | ||
iced_core::widget::operation, | ||
iced_runtime::{task, Action}, | ||
}; | ||
|
||
#[cfg(feature = "winit")] | ||
/// Produces a [`Task`] that sets a new [`Handle`] to the [`Image`] with the given [`Id`]. | ||
pub fn set_handle<Message: 'static>(id: Id, handle: impl Into<image::Handle>) -> Task<Message> { | ||
task::effect(Action::widget(operation::image::set_handle( | ||
id, | ||
handle.into(), | ||
))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters