diff options
author | 2022-11-08 08:49:26 -0800 | |
---|---|---|
committer | 2022-11-08 08:49:26 -0800 | |
commit | 7de9d2475dbf4ed93c4248580514901f82a0fc0e (patch) | |
tree | e15fdf34f58b2e4c82004ddccc5af06ca63437a6 /native/src/widget/pane_grid | |
parent | 853ff4bcf4eff24808c680f9a35bfc0013cb779d (diff) | |
download | iced-7de9d2475dbf4ed93c4248580514901f82a0fc0e.tar.gz iced-7de9d2475dbf4ed93c4248580514901f82a0fc0e.tar.bz2 iced-7de9d2475dbf4ed93c4248580514901f82a0fc0e.zip |
Couple layout & content to avoid desync
Diffstat (limited to 'native/src/widget/pane_grid')
-rw-r--r-- | native/src/widget/pane_grid/state.rs | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/native/src/widget/pane_grid/state.rs b/native/src/widget/pane_grid/state.rs index c9e9433d..58397444 100644 --- a/native/src/widget/pane_grid/state.rs +++ b/native/src/widget/pane_grid/state.rs @@ -293,17 +293,6 @@ impl Internal { } } -/// The scoped internal state of the [`PaneGrid`] -/// -/// [`PaneGrid`]: crate::widget::PaneGrid -#[derive(Debug)] -pub enum Scoped<'a> { - /// The state when all panes are visible - All(&'a Internal), - /// The state when a pane is maximized - Maximized(Node), -} - /// The current action of a [`PaneGrid`]. /// /// [`PaneGrid`]: crate::widget::PaneGrid @@ -351,12 +340,9 @@ impl Action { } } -impl<'a> Scoped<'a> { - /// The layout [`Node`] of the [`Scoped`] state +impl Internal { + /// The layout [`Node`] of the [`Internal`] state pub fn layout(&self) -> &Node { - match self { - Scoped::All(Internal { layout, .. }) => layout, - Scoped::Maximized(layout) => layout, - } + &self.layout } } |