Fix light theme

This commit is contained in:
Jason Lee 2024-06-28 10:09:50 +08:00
parent 5d3f19bdd8
commit e0050c5ebe
4 changed files with 12 additions and 15 deletions

View file

@ -5,7 +5,7 @@ use gpui::{
};
use ui::{
button::Button,
button::{Button, ButtonStyle},
h_flex,
label::Label,
list::ListItem,
@ -195,14 +195,16 @@ impl PickerStory {
impl Render for PickerStory {
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
story_case("Picker", "Picker is a list of items that can be selected.")
.child(v_flex().items_start().child(
Button::new("show-picker", "Show Picker...").on_click(cx.listener(
|this, _, cx| {
this.open = !this.open;
cx.notify();
},
)),
))
.child(
v_flex().items_start().child(
Button::new("show-picker", "Show Picker...")
.style(ButtonStyle::Primary)
.on_click(cx.listener(|this, _, cx| {
this.open = !this.open;
cx.notify();
})),
),
)
.when_some(self.selected_value.clone(), |this, selected_value| {
this.child("Selected: ").child(Label::new(selected_value))
})

View file

@ -262,13 +262,11 @@ impl<D: PickerDelegate> Picker<D> {
)
.with_sizing_behavior(sizing_behavior)
.flex_grow()
.py_2()
.track_scroll(scroll_handle.clone())
.into_any_element(),
ElementContainer::List(state) => list(state.clone())
.with_sizing_behavior(sizing_behavior)
.flex_grow()
.py_2()
.into_any_element(),
}
}

View file

@ -3,12 +3,9 @@ use gpui::{hsla, point, px, BoxShadow, Styled, WindowContext};
use smallvec::{smallvec, SmallVec};
pub enum ElevationIndex {
Background,
Surface,
ElevatedSurface,
Wash,
ModalSurface,
DraggedElement,
}
impl ElevationIndex {

View file

@ -127,7 +127,7 @@ impl Colors {
foreground: hsl(240.0, 10., 3.9),
card: hsl(0.0, 0.0, 100.0),
card_foreground: hsl(240.0, 10.0, 3.9),
popover: hsl(0.0, 0.0, 1.0),
popover: hsl(0.0, 0.0, 100.0),
popover_foreground: hsl(240.0, 10.0, 3.9),
primary: hsl(240.0, 5.9, 10.0),
primary_foreground: hsl(0.0, 0.0, 98.0),