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

@ -35,7 +35,7 @@ use ui::{
prelude::*, right_click_menu, ButtonSize, Color, IconButton, IconButtonShape, IconName,
IconSize, Indicator, Label, Tab, TabBar, TabPosition, Tooltip,
};
use ui::{v_stack, ContextMenu};
use ui::{v_flex, ContextMenu};
use util::{maybe, truncate_and_remove_front, ResultExt};
#[derive(PartialEq, Clone, Copy, Deserialize, Debug)]
@ -271,7 +271,7 @@ impl Pane {
custom_drop_handle: None,
can_split: true,
render_tab_bar_buttons: Rc::new(move |pane, cx| {
h_stack()
h_flex()
.gap_2()
.child(
IconButton::new("plus", IconName::Plus)
@ -1444,7 +1444,7 @@ impl Pane {
.track_scroll(self.tab_bar_scroll_handle.clone())
.when(self.display_nav_history_buttons, |tab_bar| {
tab_bar.start_child(
h_stack()
h_flex()
.gap_2()
.child(
IconButton::new("navigate_backward", IconName::ArrowLeft)
@ -1718,7 +1718,7 @@ impl FocusableView for Pane {
impl Render for Pane {
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
v_stack()
v_flex()
.key_context("Pane")
.track_focus(&self.focus_handle)
.size_full()