WIP: Resizing splits (#2715)
We're finally doing the thing. TODO: - [x] Choose an approach - Decided to add a new element just for the pane axis, containing a slimmed down copy of the flex code. - [x] Wire through callbacks and pointers so that data goes where it needs to - [x] Do the flex juggling math on resize - [x] Update the flexes when updating the split tree - [x] Restore the active_pane_magnification setting - [x] Serialize an axis' flexes Release Notes: - Made the center pane group splits resizable. Note that resizing is disabled if the `active_pane_magnification` setting is changed from default.
This commit is contained in:
commit
b7ed467690
7 changed files with 558 additions and 106 deletions
|
@ -1182,8 +1182,10 @@ impl EditorElement {
|
|||
});
|
||||
scene.push_mouse_region(
|
||||
MouseRegion::new::<ScrollbarMouseHandlers>(cx.view_id(), cx.view_id(), track_bounds)
|
||||
.on_move(move |_, editor: &mut Editor, cx| {
|
||||
editor.scroll_manager.show_scrollbar(cx);
|
||||
.on_move(move |event, editor: &mut Editor, cx| {
|
||||
if event.pressed_button.is_none() {
|
||||
editor.scroll_manager.show_scrollbar(cx);
|
||||
}
|
||||
})
|
||||
.on_down(MouseButton::Left, {
|
||||
let row_range = row_range.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue