Skip to content

Commit

Permalink
Merge pull request #1865 from jhff/pane_grid_edge_with_dragged_pane
Browse files Browse the repository at this point in the history
[Feature] Pane Grid: drag & drop panes to the edges
  • Loading branch information
hecrj authored Jul 6, 2023
2 parents 7f805bc + 0964f12 commit fb512c3
Show file tree
Hide file tree
Showing 5 changed files with 285 additions and 113 deletions.
3 changes: 1 addition & 2 deletions examples/pane_grid/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ impl Application for Example {
Message::Dragged(pane_grid::DragEvent::Dropped {
pane,
target,
region,
}) => {
self.panes.split_with(&target, &pane, region);
self.panes.drop(&pane, target);
}
Message::Dragged(_) => {}
Message::TogglePin(pane) => {
Expand Down
2 changes: 1 addition & 1 deletion style/src/pane_grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub trait StyleSheet {
/// The supported style of the [`StyleSheet`].
type Style: Default;

/// The [`Region`] to draw when a pane is hovered.
/// The [`Appearance`] to draw when a pane is hovered.
fn hovered_region(&self, style: &Self::Style) -> Appearance;

/// The [`Line`] to draw when a split is picked.
Expand Down
Loading

0 comments on commit fb512c3

Please sign in to comment.