From 4c44517556976454c0598c876addb10b88515cda Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 1 Apr 2020 04:34:14 +0200 Subject: Fix minor documentation issues --- native/src/widget/pane_grid.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'native/src/widget/pane_grid.rs') diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index 2eca68d3..ccb46571 100644 --- a/native/src/widget/pane_grid.rs +++ b/native/src/widget/pane_grid.rs @@ -59,12 +59,13 @@ use crate::{ /// /// let (mut state, _) = pane_grid::State::new(PaneState::SomePane); /// -/// let pane_grid = PaneGrid::new(&mut state, |pane, state, focus| { -/// match state { -/// PaneState::SomePane => Text::new("This is some pane"), -/// PaneState::AnotherKindOfPane => Text::new("This is another kind of pane"), -/// }.into() -/// }) +/// let pane_grid = +/// PaneGrid::new(&mut state, |pane, state, focus| { +/// match state { +/// PaneState::SomePane => Text::new("This is some pane"), +/// PaneState::AnotherKindOfPane => Text::new("This is another kind of pane"), +/// }.into() +/// }) /// .on_drag(Message::PaneDragged) /// .on_resize(Message::PaneResized); /// ``` -- cgit From 703f7657e15234554afb5c62fafed6fd4f8d1d03 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 2 Apr 2020 03:29:46 +0200 Subject: Add example to `pane_grid` module documentation --- native/src/widget/pane_grid.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'native/src/widget/pane_grid.rs') diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index ccb46571..f6dd328e 100644 --- a/native/src/widget/pane_grid.rs +++ b/native/src/widget/pane_grid.rs @@ -1,6 +1,13 @@ //! Let your users split regions of your application and organize layout dynamically. //! //! [![Pane grid - Iced](https://thumbs.gfycat.com/MixedFlatJellyfish-small.gif)](https://gfycat.com/mixedflatjellyfish) +//! +//! # Example +//! The [`pane_grid` example] showcases how to use a [`PaneGrid`] with resizing, +//! drag and drop, and hotkey support. +//! +//! [`pane_grid` example]: https://github.com/hecrj/iced/tree/0.1/examples/pane_grid +//! [`PaneGrid`]: struct.PaneGrid.html mod axis; mod direction; mod node; -- cgit