-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tiles: Add Tiles #435
base: main
Are you sure you want to change the base?
tiles: Add Tiles #435
Conversation
crates/ui/src/dock/state.rs
Outdated
pub(crate) x: Pixels, | ||
pub(crate) y: Pixels, | ||
pub(crate) w: Pixels, | ||
pub(crate) h: Pixels, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bounds: Bounds<Pixels>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GPUI's Bounds, Point how is serializable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crates/ui/src/dock/state.rs
Outdated
@@ -65,6 +68,16 @@ pub struct DockItemState { | |||
pub info: DockItemInfo, | |||
} | |||
|
|||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] | |||
pub struct TilePanelState { | |||
pub(crate) panel_state: DockItemState, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
panels: Vec<DockItemState>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crates/ui/src/dock/tiles_panel.rs
Outdated
initial_panel_bounds: panel_bounds, | ||
}; | ||
this.update_resizing_drag(drag_data, cx); | ||
this.bring_panel_to_front(this.resizing_panel_index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resizing_panel_index
-> resizing_index
In the tiles
, the primary item is the panel
not have any other things.
So active_index
, resizing_index
that must means the panel
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crates/ui/src/dock/tiles_panel.rs
Outdated
} | ||
let current_mouse_position = | ||
e.event.position; | ||
let delta = current_mouse_position.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current_mouse_position
-> pos
or position
to less code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crates/ui/src/dock/tiles_panel.rs
Outdated
}) | ||
.child(if !is_occluded(&bottom_handle_bounds) { | ||
div() | ||
.id("bottom-resize-handle") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split all resize-handle
into render_resize_handles
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crates/ui/src/dock/tiles_panel.rs
Outdated
}) | ||
.child(if !is_occluded(&drag_bar_bounds) { | ||
h_flex() | ||
.id("drag-bar") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split drag-bar to render_drag_bar
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.