Fix light theme
This commit is contained in:
parent
5d3f19bdd8
commit
e0050c5ebe
4 changed files with 12 additions and 15 deletions
|
|
@ -5,7 +5,7 @@ use gpui::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use ui::{
|
use ui::{
|
||||||
button::Button,
|
button::{Button, ButtonStyle},
|
||||||
h_flex,
|
h_flex,
|
||||||
label::Label,
|
label::Label,
|
||||||
list::ListItem,
|
list::ListItem,
|
||||||
|
|
@ -195,14 +195,16 @@ impl PickerStory {
|
||||||
impl Render for PickerStory {
|
impl Render for PickerStory {
|
||||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||||
story_case("Picker", "Picker is a list of items that can be selected.")
|
story_case("Picker", "Picker is a list of items that can be selected.")
|
||||||
.child(v_flex().items_start().child(
|
.child(
|
||||||
Button::new("show-picker", "Show Picker...").on_click(cx.listener(
|
v_flex().items_start().child(
|
||||||
|this, _, cx| {
|
Button::new("show-picker", "Show Picker...")
|
||||||
this.open = !this.open;
|
.style(ButtonStyle::Primary)
|
||||||
cx.notify();
|
.on_click(cx.listener(|this, _, cx| {
|
||||||
},
|
this.open = !this.open;
|
||||||
)),
|
cx.notify();
|
||||||
))
|
})),
|
||||||
|
),
|
||||||
|
)
|
||||||
.when_some(self.selected_value.clone(), |this, selected_value| {
|
.when_some(self.selected_value.clone(), |this, selected_value| {
|
||||||
this.child("Selected: ").child(Label::new(selected_value))
|
this.child("Selected: ").child(Label::new(selected_value))
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -262,13 +262,11 @@ impl<D: PickerDelegate> Picker<D> {
|
||||||
)
|
)
|
||||||
.with_sizing_behavior(sizing_behavior)
|
.with_sizing_behavior(sizing_behavior)
|
||||||
.flex_grow()
|
.flex_grow()
|
||||||
.py_2()
|
|
||||||
.track_scroll(scroll_handle.clone())
|
.track_scroll(scroll_handle.clone())
|
||||||
.into_any_element(),
|
.into_any_element(),
|
||||||
ElementContainer::List(state) => list(state.clone())
|
ElementContainer::List(state) => list(state.clone())
|
||||||
.with_sizing_behavior(sizing_behavior)
|
.with_sizing_behavior(sizing_behavior)
|
||||||
.flex_grow()
|
.flex_grow()
|
||||||
.py_2()
|
|
||||||
.into_any_element(),
|
.into_any_element(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,9 @@ use gpui::{hsla, point, px, BoxShadow, Styled, WindowContext};
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
|
|
||||||
pub enum ElevationIndex {
|
pub enum ElevationIndex {
|
||||||
Background,
|
|
||||||
Surface,
|
Surface,
|
||||||
ElevatedSurface,
|
ElevatedSurface,
|
||||||
Wash,
|
|
||||||
ModalSurface,
|
ModalSurface,
|
||||||
DraggedElement,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ElevationIndex {
|
impl ElevationIndex {
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ impl Colors {
|
||||||
foreground: hsl(240.0, 10., 3.9),
|
foreground: hsl(240.0, 10., 3.9),
|
||||||
card: hsl(0.0, 0.0, 100.0),
|
card: hsl(0.0, 0.0, 100.0),
|
||||||
card_foreground: hsl(240.0, 10.0, 3.9),
|
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),
|
popover_foreground: hsl(240.0, 10.0, 3.9),
|
||||||
primary: hsl(240.0, 5.9, 10.0),
|
primary: hsl(240.0, 5.9, 10.0),
|
||||||
primary_foreground: hsl(0.0, 0.0, 98.0),
|
primary_foreground: hsl(0.0, 0.0, 98.0),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue