Skip to content
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

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open

tiles: Add Tiles #435

wants to merge 49 commits into from

Conversation

xda2023
Copy link
Collaborator

@xda2023 xda2023 commented Nov 25, 2024

No description provided.

@xda2023 xda2023 marked this pull request as draft November 25, 2024 14:12
@xda2023 xda2023 changed the title tiles: support moving and resizing tiles: support moving, resizing and z-index Dec 1, 2024
@xda2023 xda2023 marked this pull request as ready for review December 9, 2024 13:49
pub(crate) x: Pixels,
pub(crate) y: Pixels,
pub(crate) w: Pixels,
pub(crate) h: Pixels,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bounds: Bounds<Pixels>

Copy link
Member

@huacnlee huacnlee Dec 10, 2024

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

zed-industries/zed#21783

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -65,6 +68,16 @@ pub struct DockItemState {
pub info: DockItemInfo,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct TilePanelState {
pub(crate) panel_state: DockItemState,
Copy link
Member

@huacnlee huacnlee Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

panels: Vec<DockItemState>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial_panel_bounds: panel_bounds,
};
this.update_resizing_drag(drag_data, cx);
this.bring_panel_to_front(this.resizing_panel_index);
Copy link
Member

@huacnlee huacnlee Dec 10, 2024

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
let current_mouse_position =
e.event.position;
let delta = current_mouse_position.x
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

})
.child(if !is_occluded(&bottom_handle_bounds) {
div()
.id("bottom-resize-handle")
Copy link
Member

@huacnlee huacnlee Dec 10, 2024

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

})
.child(if !is_occluded(&drag_bar_bounds) {
h_flex()
.id("drag-bar")
Copy link
Member

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huacnlee huacnlee changed the title tiles: support moving, resizing and z-index tiles: Add Tiles Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants