diff options
author | 2019-11-11 07:11:41 +0100 | |
---|---|---|
committer | 2019-11-11 07:11:41 +0100 | |
commit | 60774740efee5ff612390f1c3456282d63b5907c (patch) | |
tree | c5612793dd91267da5e688a755d54f6828e14363 | |
parent | 860a6923bbed57a21ce4b2cae331f6a3a51ca3fe (diff) | |
download | iced-60774740efee5ff612390f1c3456282d63b5907c.tar.gz iced-60774740efee5ff612390f1c3456282d63b5907c.tar.bz2 iced-60774740efee5ff612390f1c3456282d63b5907c.zip |
Fix doc comments and remove `Align` from `tour`
-rw-r--r-- | examples/tour.rs | 2 | ||||
-rw-r--r-- | native/src/element.rs | 10 | ||||
-rw-r--r-- | native/src/lib.rs | 19 |
3 files changed, 20 insertions, 11 deletions
diff --git a/examples/tour.rs b/examples/tour.rs index 2e60f090..3fd031b8 100644 --- a/examples/tour.rs +++ b/examples/tour.rs @@ -1,5 +1,5 @@ use iced::{ - button, scrollable, slider, text::HorizontalAlignment, text_input, Align, + button, scrollable, slider, text::HorizontalAlignment, text_input, Application, Background, Button, Checkbox, Color, Column, Container, Element, Image, Length, Radio, Row, Scrollable, Slider, Text, TextInput, }; diff --git a/native/src/element.rs b/native/src/element.rs index 361d7567..23f069f1 100644 --- a/native/src/element.rs +++ b/native/src/element.rs @@ -128,7 +128,7 @@ where /// # /// # mod iced_wgpu { /// # use iced_native::{ - /// # text, row, Text, Node, Point, Rectangle, Style, Layout, Row + /// # text, row, layout, Text, Size, Point, Rectangle, Layout, Row /// # }; /// # pub struct Renderer; /// # @@ -144,8 +144,12 @@ where /// # } /// # /// # impl text::Renderer for Renderer { - /// # fn node(&self, _text: &Text) -> Node { - /// # Node::new(Style::default()) + /// # fn layout( + /// # &self, + /// # _text: &Text, + /// # _limits: &layout::Limits, + /// # ) -> layout::Node { + /// # layout::Node::new(Size::ZERO) /// # } /// # /// # fn draw( diff --git a/native/src/lib.rs b/native/src/lib.rs index d9e8f385..a091059e 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -77,7 +77,7 @@ //! # //! # mod iced_wgpu { //! # use iced_native::{ -//! # button, text, Button, Text, Node, Point, Rectangle, Style, Color, Layout +//! # button, text, layout, Button, Text, Point, Rectangle, Color, Layout, Size //! # }; //! # //! # pub struct Renderer {} @@ -87,11 +87,12 @@ //! # } //! # //! # impl button::Renderer for Renderer { -//! # fn node<Message>( +//! # fn layout<Message>( //! # &self, -//! # _button: &Button<'_, Message, Self> -//! # ) -> Node { -//! # Node::new(Style::default()) +//! # _button: &Button<'_, Message, Self>, +//! # _limits: &layout::Limits, +//! # ) -> layout::Node { +//! # layout::Node::new(Size::ZERO) //! # } //! # //! # fn draw<Message>( @@ -103,8 +104,12 @@ //! # } //! # //! # impl text::Renderer for Renderer { -//! # fn node(&self, _text: &Text) -> Node { -//! # Node::new(Style::default()) +//! # fn layout( +//! # &self, +//! # _text: &Text, +//! # _limits: &layout::Limits, +//! # ) -> layout::Node { +//! # layout::Node::new(Size::ZERO) //! # } //! # //! # fn draw( |