Rename h_stack and v_stack to h_flex and v_flex, respectively (#4053)

This PR renames the `h_stack` and `v_stack` to `h_flex` and `v_flex`,
respectively.

We were previously using `h_stack` and `v_stack` to match SwiftUI, but
`h_flex` and `v_flex` fit better with the web/flexbox terminology that
the rest of GPUI uses.

Additionally, we were already calling the utility functions used to
implement `h_stack` and `v_stack` by the new names.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-01-15 11:34:06 -05:00 committed by GitHub
parent b136d21ebf
commit 90f4c70a82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 271 additions and 271 deletions

View file

@ -325,13 +325,13 @@ impl ChatPanel {
};
let this = cx.view().clone();
v_stack()
v_flex()
.w_full()
.relative()
.overflow_hidden()
.when(!is_continuation_from_previous, |this| {
this.pt_3().child(
h_stack()
h_flex()
.child(
div().absolute().child(
Avatar::new(message.sender.avatar_uri.clone())
@ -358,7 +358,7 @@ impl ChatPanel {
})
.when(is_continuation_from_previous, |this| this.pt_1())
.child(
v_stack()
v_flex()
.w_full()
.text_ui_sm()
.id(element_id)
@ -514,14 +514,14 @@ impl ChatPanel {
impl Render for ChatPanel {
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
v_stack()
v_flex()
.track_focus(&self.focus_handle)
.full()
.on_action(cx.listener(Self::send))
.child(
h_stack().z_index(1).child(
h_flex().z_index(1).child(
TabBar::new("chat_header").child(
h_stack()
h_flex()
.w_full()
.h(rems(ui::Tab::HEIGHT_IN_REMS))
.px_2()
@ -567,7 +567,7 @@ impl Render for ChatPanel {
}
}))
.child(
h_stack()
h_flex()
.when(!self.is_scrolled_to_bottom, |el| {
el.border_t_1().border_color(cx.theme().colors().border)
})