From 87c172d92ffa63c72de1212b23af68069b2d736c Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Sat, 3 Apr 2021 09:49:25 -0400 Subject: [PATCH 1/3] updating viewswitcher doc to be more accurate --- druid/src/widget/view_switcher.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/druid/src/widget/view_switcher.rs b/druid/src/widget/view_switcher.rs index b4cbb7bce4..881d6c831f 100644 --- a/druid/src/widget/view_switcher.rs +++ b/druid/src/widget/view_switcher.rs @@ -18,13 +18,11 @@ use crate::widget::prelude::*; use crate::{Data, Point, WidgetPod}; use tracing::instrument; -/// A widget that can switch dynamically between one of many views depending -/// on application state. - type ChildPicker = dyn Fn(&T, &Env) -> U; type ChildBuilder = dyn Fn(&U, &T, &Env) -> Box>; -/// A widget that dynamically switches between two children. +/// A widget that can switch dynamically between one of many views depending +/// on application state. pub struct ViewSwitcher { child_picker: Box>, child_builder: Box>, From f5e2a5bcf321561a61a97584a936148ef77a7576 Mon Sep 17 00:00:00 2001 From: Colin Rofls Date: Sun, 4 Apr 2021 13:44:15 -0400 Subject: [PATCH 2/3] Update druid/src/widget/view_switcher.rs --- druid/src/widget/view_switcher.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/druid/src/widget/view_switcher.rs b/druid/src/widget/view_switcher.rs index 881d6c831f..e25d03f1b7 100644 --- a/druid/src/widget/view_switcher.rs +++ b/druid/src/widget/view_switcher.rs @@ -21,8 +21,7 @@ use tracing::instrument; type ChildPicker = dyn Fn(&T, &Env) -> U; type ChildBuilder = dyn Fn(&U, &T, &Env) -> Box>; -/// A widget that can switch dynamically between one of many views depending -/// on application state. +/// A widget that switches dynamically between multiple children. pub struct ViewSwitcher { child_picker: Box>, child_builder: Box>, From 3dad7e648bdd731b18da554ea1a4ff7241e5d3d2 Mon Sep 17 00:00:00 2001 From: lazypassion <25536767+lazypassion@users.noreply.github.com> Date: Mon, 5 Apr 2021 13:51:09 -0400 Subject: [PATCH 3/3] updating changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8b0903edf..73840260ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ You can find its changes [documented below](#070---2021-01-01). - Fixed docs of derived Lens ([#1523] by [@Maan2003]) - Use correct fill rule when rendering SVG paths ([#1606] by [@SecondFlight]) - Correctly capture and use stroke properties when rendering SVG paths ([#1647] by [@SecondFlight]) +- Fixed docs describing `ViewSwitcher` widget functionality ([#1693] by [@arthmis]) ### Visual @@ -657,6 +658,7 @@ Last release without a changelog :( [#1660]: https://github.com/linebender/druid/pull/1660 [#1662]: https://github.com/linebender/druid/pull/1662 [#1677]: https://github.com/linebender/druid/pull/1677 +[#1693]: https://github.com/linebender/druid/pull/1693 [Unreleased]: https://github.com/linebender/druid/compare/v0.7.0...master [0.7.0]: https://github.com/linebender/druid/compare/v0.6.0...v0.7.0