Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Adjust `TintColor` color token terminology (#22826)
Danilo Leal115aa433545b
diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rsindex 0eaa0f5ca88..712aaa845ab 100644--- a/crates/assistant/src/assistant_panel.rs+++ b/crates/assistant/src/assistant_panel.rs@@ -3654,7 +3654,7 @@ impl ContextEditor {let (style, tooltip) = match token_state(&self.context, cx) {Some(TokenState::NoTokensLeft { .. }) => (- ButtonStyle::Tinted(TintColor::Negative),+ ButtonStyle::Tinted(TintColor::Error),Some(Tooltip::text("Token limit reached", cx)),),Some(TokenState::HasMoreTokens {@@ -3711,7 +3711,7 @@ impl ContextEditor {let (style, tooltip) = match token_state(&self.context, cx) {Some(TokenState::NoTokensLeft { .. }) => (- ButtonStyle::Tinted(TintColor::Negative),+ ButtonStyle::Tinted(TintColor::Error),Some(Tooltip::text("Token limit reached", cx)),),Some(TokenState::HasMoreTokens {diff --git a/crates/title_bar/src/collab.rs b/crates/title_bar/src/collab.rsindex 5ef724ef7ad..8639e48c5eb 100644--- a/crates/title_bar/src/collab.rs+++ b/crates/title_bar/src/collab.rs@@ -381,7 +381,7 @@ impl TitleBar {.style(ButtonStyle::Subtle).icon_size(IconSize::Small).toggle_state(is_muted)- .selected_style(ButtonStyle::Tinted(TintColor::Negative))+ .selected_style(ButtonStyle::Tinted(TintColor::Error)).on_click(move |_, cx| {toggle_mute(&Default::default(), cx);})@@ -398,7 +398,7 @@ impl TitleBar {},).style(ButtonStyle::Subtle)- .selected_style(ButtonStyle::Tinted(TintColor::Negative))+ .selected_style(ButtonStyle::Tinted(TintColor::Error)).icon_size(IconSize::Small).toggle_state(is_deafened).tooltip(move |cx| {diff --git a/crates/ui/src/components/button/button.rs b/crates/ui/src/components/button/button.rsindex 4a2975bab72..45f185a5506 100644--- a/crates/ui/src/components/button/button.rs+++ b/crates/ui/src/components/button/button.rs@@ -474,9 +474,9 @@ impl ComponentPreview for Button {.style(ButtonStyle::Tinted(TintColor::Accent)),),single_example(- "Negative",- Button::new("tinted_negative", "Negative")- .style(ButtonStyle::Tinted(TintColor::Negative)),+ "Error",+ Button::new("tinted_negative", "Error")+ .style(ButtonStyle::Tinted(TintColor::Error)),),single_example("Warning",@@ -484,9 +484,9 @@ impl ComponentPreview for Button {.style(ButtonStyle::Tinted(TintColor::Warning)),),single_example(- "Positive",- Button::new("tinted_positive", "Positive")- .style(ButtonStyle::Tinted(TintColor::Positive)),+ "Success",+ Button::new("tinted_positive", "Success")+ .style(ButtonStyle::Tinted(TintColor::Success)),),],),@@ -527,8 +527,8 @@ impl ComponentPreview for Button {),single_example("Tinted Icons",- Button::new("icon_color", "Delete")- .style(ButtonStyle::Tinted(TintColor::Negative))+ Button::new("icon_color", "Error")+ .style(ButtonStyle::Tinted(TintColor::Error)).color(Color::Error).icon_color(Color::Error).icon(IconName::Trash)diff --git a/crates/ui/src/components/button/button_like.rs b/crates/ui/src/components/button/button_like.rsindex e2d83486cd9..26ef2fc19f1 100644--- a/crates/ui/src/components/button/button_like.rs+++ b/crates/ui/src/components/button/button_like.rs@@ -49,9 +49,9 @@ pub enum IconPosition {pub enum TintColor {#[default]Accent,- Negative,+ Error,Warning,- Positive,+ Success,}impl TintColor {@@ -63,7 +63,7 @@ impl TintColor {label_color: cx.theme().colors().text,icon_color: cx.theme().colors().text,},- TintColor::Negative => ButtonLikeStyles {+ TintColor::Error => ButtonLikeStyles {background: cx.theme().status().error_background,border_color: cx.theme().status().error_border,label_color: cx.theme().colors().text,@@ -75,7 +75,7 @@ impl TintColor {label_color: cx.theme().colors().text,icon_color: cx.theme().colors().text,},- TintColor::Positive => ButtonLikeStyles {+ TintColor::Success => ButtonLikeStyles {background: cx.theme().status().success_background,border_color: cx.theme().status().success_border,label_color: cx.theme().colors().text,@@ -89,9 +89,9 @@ impl From<TintColor> for Color {fn from(tint: TintColor) -> Self {match tint {TintColor::Accent => Color::Accent,- TintColor::Negative => Color::Error,+ TintColor::Error => Color::Error,TintColor::Warning => Color::Warning,- TintColor::Positive => Color::Success,+ TintColor::Success => Color::Success,}}}