Revert "ui: Color cleanup (#26673)" (#26681)

This reverts commit 6767e98e00.

Somehow that PR automerged itself even with failed CI checks.

Release Notes:

- N/A
This commit is contained in:
Nate Butler 2025-03-13 11:40:57 -04:00 committed by GitHub
parent 87cdb68cca
commit b75964a636
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 161 additions and 139 deletions

View file

@ -59,7 +59,8 @@ use std::{collections::HashSet, sync::Arc, time::Duration, usize};
use strum::{IntoEnumIterator, VariantNames};
use time::OffsetDateTime;
use ui::{
prelude::*, Checkbox, ContextMenu, Elevation, PopoverMenu, Scrollbar, ScrollbarState, Tooltip,
prelude::*, Checkbox, ContextMenu, ElevationIndex, PopoverMenu, Scrollbar, ScrollbarState,
Tooltip,
};
use util::{maybe, post_inc, ResultExt, TryFutureExt};
use workspace::{AppState, OpenOptions, OpenVisible};
@ -3189,7 +3190,7 @@ impl GitPanel {
let checkbox = Checkbox::new("stage-file", entry_staging.as_bool().into())
.disabled(!self.has_write_access(cx))
.fill()
.elevation(Elevation::Surface)
.elevation(ElevationIndex::Surface)
.on_click({
let entry = entry.clone();
let git_panel = entity.downgrade();
@ -3638,7 +3639,7 @@ impl GitPanel {
&& !self.has_conflicts()
&& !entry.status.is_created(),
)
.elevation(Elevation::Surface)
.elevation(ElevationIndex::Surface)
.on_click({
let entry = entry.clone();
cx.listener(move |this, _, window, cx| {
@ -3781,7 +3782,7 @@ impl Render for GitPanel {
}))
.size_full()
.overflow_hidden()
.bg(Elevation::Surface.bg(cx))
.bg(ElevationIndex::Surface.bg(cx))
.child(
v_flex()
.size_full()

View file

@ -168,9 +168,9 @@ mod remote_button {
use gpui::{hsla, point, Action, AnyView, BoxShadow, ClickEvent, Corner, FocusHandle};
use ui::{
div, h_flex, px, rems, ActiveTheme, AnyElement, App, ButtonCommon, ButtonLike, Clickable,
ContextMenu, ElementId, Elevation, FluentBuilder, Icon, IconName, IconSize, IntoElement,
Label, LabelCommon, LabelSize, LineHeightStyle, ParentElement, PopoverMenu, RenderOnce,
SharedString, Styled, Tooltip, Window,
ContextMenu, ElementId, ElevationIndex, FluentBuilder, Icon, IconName, IconSize,
IntoElement, Label, LabelCommon, LabelSize, LineHeightStyle, ParentElement, PopoverMenu,
RenderOnce, SharedString, Styled, Tooltip, Window,
};
pub fn render_fetch_button(
@ -343,7 +343,7 @@ mod remote_button {
PopoverMenu::new(id.into())
.trigger(
ui::ButtonLike::new_rounded_right("split-button-right")
.elevation(ui::Elevation::ModalSurface)
.layer(ui::ElevationIndex::ModalSurface)
.size(ui::ButtonSize::None)
.child(
div()
@ -406,7 +406,7 @@ mod remote_button {
let left = ui::ButtonLike::new_rounded_left(ElementId::Name(
format!("split-button-left-{}", id).into(),
))
.elevation(ui::Elevation::ModalSurface)
.layer(ui::ElevationIndex::ModalSurface)
.size(ui::ButtonSize::Compact)
.when(should_render_counts, |this| {
this.child(
@ -463,7 +463,7 @@ mod remote_button {
.bg(cx.theme().colors().text_muted.alpha(0.16)),
)
.child(self.right)
.bg(Elevation::Surface.on_elevation_bg(cx))
.bg(ElevationIndex::Surface.on_elevation_bg(cx))
.shadow(smallvec::smallvec![BoxShadow {
color: hsla(0.0, 0.0, 0.0, 0.16),
offset: point(px(0.), px(1.)),