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:
parent
b136d21ebf
commit
90f4c70a82
69 changed files with 271 additions and 271 deletions
|
@ -5,7 +5,7 @@ use gpui::{
|
|||
View, ViewContext, WindowContext,
|
||||
};
|
||||
use std::{cmp, sync::Arc};
|
||||
use ui::{prelude::*, v_stack, Color, Divider, Label, ListItem, ListItemSpacing, ListSeparator};
|
||||
use ui::{prelude::*, v_flex, Color, Divider, Label, ListItem, ListItemSpacing, ListSeparator};
|
||||
use workspace::ModalView;
|
||||
|
||||
pub struct Picker<D: PickerDelegate> {
|
||||
|
@ -236,7 +236,7 @@ impl<D: PickerDelegate> ModalView for Picker<D> {}
|
|||
|
||||
impl<D: PickerDelegate> Render for Picker<D> {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
let picker_editor = h_stack()
|
||||
let picker_editor = h_flex()
|
||||
.overflow_hidden()
|
||||
.flex_none()
|
||||
.h_9()
|
||||
|
@ -264,7 +264,7 @@ impl<D: PickerDelegate> Render for Picker<D> {
|
|||
.child(Divider::horizontal())
|
||||
.when(self.delegate.match_count() > 0, |el| {
|
||||
el.child(
|
||||
v_stack()
|
||||
v_flex()
|
||||
.flex_grow()
|
||||
.py_2()
|
||||
.max_h(self.max_height.unwrap_or(rems(18.).into()))
|
||||
|
@ -309,7 +309,7 @@ impl<D: PickerDelegate> Render for Picker<D> {
|
|||
})
|
||||
.when(self.delegate.match_count() == 0, |el| {
|
||||
el.child(
|
||||
v_stack().flex_grow().py_2().child(
|
||||
v_flex().flex_grow().py_2().child(
|
||||
ListItem::new("empty_state")
|
||||
.inset(true)
|
||||
.spacing(ListItemSpacing::Sparse)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue