summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-09-03 14:30:12 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-09-03 14:30:12 +0200
commit2c35103035e47485f2fb049f86b3c00feb4b99d2 (patch)
treefec9440b30ef295cc00b3aec70c74329f6e5c237 /src
parent3e41c4b590bed7c18a45f08cfb89e27b18c720ce (diff)
downloadiced-2c35103035e47485f2fb049f86b3c00feb4b99d2.tar.gz
iced-2c35103035e47485f2fb049f86b3c00feb4b99d2.tar.bz2
iced-2c35103035e47485f2fb049f86b3c00feb4b99d2.zip
Fix docs for `image`
Diffstat (limited to 'src')
-rw-r--r--src/widget/checkbox.rs4
-rw-r--r--src/widget/image.rs26
2 files changed, 15 insertions, 15 deletions
diff --git a/src/widget/checkbox.rs b/src/widget/checkbox.rs
index b9a40a37..34d5df53 100644
--- a/src/widget/checkbox.rs
+++ b/src/widget/checkbox.rs
@@ -64,8 +64,8 @@ impl<Color, Message> Checkbox<Color, Message> {
/// * a boolean describing whether the [`Checkbox`] is checked or not
/// * the label of the [`Checkbox`]
/// * a function that will be called when the [`Checkbox`] is toggled.
- /// It receives the new state of the [`Checkbox`] and must produce a
- /// `Message`.
+ /// It will receive the new state of the [`Checkbox`] and must produce
+ /// a `Message`.
///
/// [`Checkbox`]: struct.Checkbox.html
pub fn new<F>(is_checked: bool, label: &str, f: F) -> Self
diff --git a/src/widget/image.rs b/src/widget/image.rs
index e85b43b5..8cbcd02c 100644
--- a/src/widget/image.rs
+++ b/src/widget/image.rs
@@ -1,4 +1,4 @@
-//! Displays image to your users.
+//! Display images in your user interface.
use crate::{
Element, Hasher, Layout, MouseCursor, Node, Point, Rectangle, Style, Widget,
@@ -6,14 +6,14 @@ use crate::{
use std::hash::Hash;
-/// A widget that displays an image.
+/// A frame that displays an image while keeping aspect ratio.
///
-/// It implements [`Widget`] when the associated [`core::Renderer`] implements
-/// the [`image::Renderer`] trait.
+/// It implements [`Widget`] when the associated `Renderer` implements the
+/// [`image::Renderer`] trait.
///
/// [`Widget`]: ../../core/trait.Widget.html
-/// [`core::Renderer`]: ../../core/trait.Renderer.html
/// [`image::Renderer`]: trait.Renderer.html
+///
/// # Example
///
/// ```
@@ -49,7 +49,7 @@ impl<I> Image<I> {
}
}
- /// Sets the portion of the [`Image`] that we want to draw.
+ /// Sets the portion of the [`Image`] to draw.
///
/// [`Image`]: struct.Image.html
pub fn clip(mut self, source: Rectangle<u16>) -> Self {
@@ -99,21 +99,21 @@ where
}
}
-/// The renderer of a [`Image`].
+/// The renderer of an [`Image`].
///
-/// Your [`core::Renderer`] will need to implement this trait before being
-/// able to use a [`Image`] in your user interface.
+/// Your [renderer] will need to implement this trait before being able to use
+/// an [`Image`] in your user interface.
///
/// [`Image`]: struct.Image.html
-/// [`core::Renderer`]: ../../core/trait.Renderer.html
+/// [renderer]: ../../renderer/index.html
pub trait Renderer<I> {
- /// Draws a [`Image`].
+ /// Draws an [`Image`].
///
/// It receives:
/// * the bounds of the [`Image`]
/// * the handle of the loaded [`Image`]
- /// * the portion of the image that we wants to draw,
- /// if not specified, draw entire image
+ /// * the portion of the image to draw. If not specified, the entire image
+ /// should be drawn.
///
/// [`Image`]: struct.Image.html
fn draw(