Refactor command palette, picker and code action styles.
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
This commit is contained in:
parent
3d66ba35a3
commit
6bdb6e486e
3 changed files with 12 additions and 19 deletions
|
@ -5,8 +5,7 @@ use gpui::{
|
|||
WindowContext,
|
||||
};
|
||||
use std::cmp;
|
||||
use theme::ActiveTheme;
|
||||
use ui::v_stack;
|
||||
use ui::{prelude::*, v_stack, Divider};
|
||||
|
||||
pub struct Picker<D: PickerDelegate> {
|
||||
pub delegate: D,
|
||||
|
@ -145,6 +144,7 @@ impl<D: PickerDelegate> Render for Picker<D> {
|
|||
.id("picker-container")
|
||||
.focusable()
|
||||
.size_full()
|
||||
.elevation_2(cx)
|
||||
.on_action(Self::select_next)
|
||||
.on_action(Self::select_prev)
|
||||
.on_action(Self::select_first)
|
||||
|
@ -153,19 +153,12 @@ impl<D: PickerDelegate> Render for Picker<D> {
|
|||
.on_action(Self::confirm)
|
||||
.on_action(Self::secondary_confirm)
|
||||
.child(
|
||||
v_stack().gap_px().child(
|
||||
v_stack()
|
||||
.py_0p5()
|
||||
.px_1()
|
||||
.child(div().px_2().py_0p5().child(self.editor.clone())),
|
||||
),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.h_px()
|
||||
.w_full()
|
||||
.bg(cx.theme().colors().element_background),
|
||||
v_stack()
|
||||
.py_0p5()
|
||||
.px_1()
|
||||
.child(div().px_2().py_0p5().child(self.editor.clone())),
|
||||
)
|
||||
.child(Divider::horizontal())
|
||||
.child(
|
||||
v_stack()
|
||||
.py_0p5()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue