Update command palette style

This commit is contained in:
Nate Butler 2023-11-12 22:13:54 -05:00
parent 6bdb6e486e
commit 800ad1d3dc
3 changed files with 10 additions and 12 deletions

View file

@ -8,7 +8,7 @@ use gpui::{
use picker::{Picker, PickerDelegate}; use picker::{Picker, PickerDelegate};
use std::cmp::{self, Reverse}; use std::cmp::{self, Reverse};
use theme::ActiveTheme; use theme::ActiveTheme;
use ui::{modal, v_stack, Label}; use ui::{v_stack, Label, StyledExt};
use util::{ use util::{
channel::{parse_zed_link, ReleaseChannel, RELEASE_CHANNEL}, channel::{parse_zed_link, ReleaseChannel, RELEASE_CHANNEL},
ResultExt, ResultExt,
@ -305,15 +305,13 @@ impl PickerDelegate for CommandPaletteDelegate {
}; };
div() div()
.px_1()
.text_color(colors.text) .text_color(colors.text)
.when(selected, |s| { .text_ui()
s.border_l_10().border_color(colors.terminal_ansi_yellow) .bg(colors.ghost_element_background)
}) .rounded_md()
.hover(|style| { .when(selected, |this| this.bg(colors.ghost_element_selected))
style .hover(|this| this.bg(colors.ghost_element_hover))
.bg(colors.element_active)
.text_color(colors.text_accent)
})
.child(Label::new(command.name.clone())) .child(Label::new(command.name.clone()))
} }

View file

@ -1555,6 +1555,7 @@ impl CodeActionsMenu {
let colors = cx.theme().colors(); let colors = cx.theme().colors();
div() div()
.px_2() .px_2()
.text_ui()
.text_color(colors.text) .text_color(colors.text)
.when(selected, |style| { .when(selected, |style| {
style style

View file

@ -156,13 +156,12 @@ impl<D: PickerDelegate> Render for Picker<D> {
v_stack() v_stack()
.py_0p5() .py_0p5()
.px_1() .px_1()
.child(div().px_2().py_0p5().child(self.editor.clone())), .child(div().px_1().py_0p5().child(self.editor.clone())),
) )
.child(Divider::horizontal()) .child(Divider::horizontal())
.child( .child(
v_stack() v_stack()
.py_0p5() .p_1()
.px_1()
.grow() .grow()
.child( .child(
uniform_list("candidates", self.delegate.match_count(), { uniform_list("candidates", self.delegate.match_count(), {