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
|
@ -6,7 +6,7 @@ use gpui::{
|
|||
};
|
||||
use language::Diagnostic;
|
||||
use lsp::LanguageServerId;
|
||||
use ui::{h_stack, prelude::*, Button, ButtonLike, Color, Icon, IconName, Label, Tooltip};
|
||||
use ui::{h_flex, prelude::*, Button, ButtonLike, Color, Icon, IconName, Label, Tooltip};
|
||||
use workspace::{item::ItemHandle, StatusItemView, ToolbarItemEvent, Workspace};
|
||||
|
||||
use crate::{Deploy, ProjectDiagnosticsEditor};
|
||||
|
@ -23,14 +23,14 @@ pub struct DiagnosticIndicator {
|
|||
impl Render for DiagnosticIndicator {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||
let diagnostic_indicator = match (self.summary.error_count, self.summary.warning_count) {
|
||||
(0, 0) => h_stack().map(|this| {
|
||||
(0, 0) => h_flex().map(|this| {
|
||||
this.child(
|
||||
Icon::new(IconName::Check)
|
||||
.size(IconSize::Small)
|
||||
.color(Color::Default),
|
||||
)
|
||||
}),
|
||||
(0, warning_count) => h_stack()
|
||||
(0, warning_count) => h_flex()
|
||||
.gap_1()
|
||||
.child(
|
||||
Icon::new(IconName::ExclamationTriangle)
|
||||
|
@ -38,7 +38,7 @@ impl Render for DiagnosticIndicator {
|
|||
.color(Color::Warning),
|
||||
)
|
||||
.child(Label::new(warning_count.to_string()).size(LabelSize::Small)),
|
||||
(error_count, 0) => h_stack()
|
||||
(error_count, 0) => h_flex()
|
||||
.gap_1()
|
||||
.child(
|
||||
Icon::new(IconName::XCircle)
|
||||
|
@ -46,7 +46,7 @@ impl Render for DiagnosticIndicator {
|
|||
.color(Color::Error),
|
||||
)
|
||||
.child(Label::new(error_count.to_string()).size(LabelSize::Small)),
|
||||
(error_count, warning_count) => h_stack()
|
||||
(error_count, warning_count) => h_flex()
|
||||
.gap_1()
|
||||
.child(
|
||||
Icon::new(IconName::XCircle)
|
||||
|
@ -64,7 +64,7 @@ impl Render for DiagnosticIndicator {
|
|||
|
||||
let status = if !self.in_progress_checks.is_empty() {
|
||||
Some(
|
||||
h_stack()
|
||||
h_flex()
|
||||
.gap_2()
|
||||
.child(Icon::new(IconName::ArrowCircle).size(IconSize::Small))
|
||||
.child(
|
||||
|
@ -91,7 +91,7 @@ impl Render for DiagnosticIndicator {
|
|||
None
|
||||
};
|
||||
|
||||
h_stack()
|
||||
h_flex()
|
||||
.h(rems(1.375))
|
||||
.gap_2()
|
||||
.child(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue