Display widget images in documentation

This commit is contained in:
Héctor Ramón Jiménez 2019-11-24 10:48:29 +01:00
parent 7760618fb1
commit 47196c9007
4 changed files with 6 additions and 2 deletions

View file

@ -24,7 +24,7 @@ use crate::{
/// Checkbox::new(is_checked, "Toggle me!", Message::CheckboxToggled); /// Checkbox::new(is_checked, "Toggle me!", Message::CheckboxToggled);
/// ``` /// ```
/// ///
/// ![Checkbox drawn by Coffee's renderer](https://github.com/hecrj/coffee/blob/bda9818f823dfcb8a7ad0ff4940b4d4b387b5208/images/ui/checkbox.png?raw=true) /// ![Checkbox drawn by `iced_wgpu`](https://github.com/hecrj/iced/blob/7760618fb112074bc40b148944521f312152012a/docs/images/checkbox.png?raw=true)
#[allow(missing_debug_implementations)] #[allow(missing_debug_implementations)]
pub struct Checkbox<Message> { pub struct Checkbox<Message> {
is_checked: bool, is_checked: bool,

View file

@ -32,7 +32,7 @@ use std::hash::Hash;
/// Radio::new(Choice::B, "This is B", selected_choice, Message::RadioSelected); /// Radio::new(Choice::B, "This is B", selected_choice, Message::RadioSelected);
/// ``` /// ```
/// ///
/// ![Radio buttons drawn by Coffee's renderer](https://github.com/hecrj/coffee/blob/bda9818f823dfcb8a7ad0ff4940b4d4b387b5208/images/ui/radio.png?raw=true) /// ![Radio buttons drawn by `iced_wgpu`](https://github.com/hecrj/iced/blob/7760618fb112074bc40b148944521f312152012a/docs/images/radio.png?raw=true)
#[allow(missing_debug_implementations)] #[allow(missing_debug_implementations)]
pub struct Radio<Message> { pub struct Radio<Message> {
is_selected: bool, is_selected: bool,

View file

@ -17,6 +17,8 @@ use std::hash::Hash;
/// .color([0.0, 0.0, 1.0]) /// .color([0.0, 0.0, 1.0])
/// .size(40); /// .size(40);
/// ``` /// ```
///
/// ![Text drawn by `iced_wgpu`](https://github.com/hecrj/iced/blob/7760618fb112074bc40b148944521f312152012a/docs/images/text.png?raw=true)
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct Text { pub struct Text {
content: String, content: String,

View file

@ -16,6 +16,7 @@ use crate::{
/// ``` /// ```
/// # use iced_native::{text_input, TextInput}; /// # use iced_native::{text_input, TextInput};
/// # /// #
/// #[derive(Debug, Clone)]
/// enum Message { /// enum Message {
/// TextInputChanged(String), /// TextInputChanged(String),
/// } /// }
@ -31,6 +32,7 @@ use crate::{
/// ) /// )
/// .padding(10); /// .padding(10);
/// ``` /// ```
/// ![Text input drawn by `iced_wgpu`](https://github.com/hecrj/iced/blob/7760618fb112074bc40b148944521f312152012a/docs/images/text_input.png?raw=true)
#[allow(missing_debug_implementations)] #[allow(missing_debug_implementations)]
pub struct TextInput<'a, Message> { pub struct TextInput<'a, Message> {
state: &'a mut State, state: &'a mut State,