Adjust model selector popover design (#15056)
This PR mostly refines the model selector popover design by formatting the models names' and adjusting spacing/alignment in the list-related items. The list component changes could've been made in a separate PR but it was also very practical to do it here as I was already in-context. Either way, I'm happy to separate if that's better! One thing I couldn't necessarily figure out, though, is why the order changed (e.g., Anthropic at last ). I wonder if that was because of the separator logic somehow? I'd love guidance here—new to Rust! | Before | After | |--------|--------| | <img width="228" alt="Screenshot 2024-07-23 at 21 02 33" src="https://github.com/user-attachments/assets/3372c6c9-08dc-4d71-9265-26f015e2dbc2"> | <img width="228" alt="Screenshot 2024-07-23 at 21 01 45" src="https://github.com/user-attachments/assets/624cc7db-a3d9-48e3-99d7-c29829501130"> | --- Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com> Co-authored-by: Bennet Bo Fenner <bennet@zed.dev> Co-authored-by: Antonio <antonio@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
87d93033d1
commit
912b396e58
13 changed files with 220 additions and 298 deletions
|
@ -185,7 +185,7 @@ impl RenderOnce for ListItem {
|
|||
.w_full()
|
||||
.relative()
|
||||
.gap_1()
|
||||
.px_2()
|
||||
.px_1p5()
|
||||
.map(|this| match self.spacing {
|
||||
ListItemSpacing::Dense => this,
|
||||
ListItemSpacing::Sparse => this.py_1(),
|
||||
|
|
|
@ -8,7 +8,7 @@ impl RenderOnce for ListSeparator {
|
|||
div()
|
||||
.h_px()
|
||||
.w_full()
|
||||
.my_1()
|
||||
.my_1p5()
|
||||
.bg(cx.theme().colors().border_variant)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ impl Selectable for ListSubHeader {
|
|||
|
||||
impl RenderOnce for ListSubHeader {
|
||||
fn render(self, cx: &mut WindowContext) -> impl IntoElement {
|
||||
h_flex().flex_1().w_full().relative().py_1().child(
|
||||
h_flex().flex_1().w_full().relative().pb_1().px_0p5().child(
|
||||
div()
|
||||
.h_6()
|
||||
.when(self.inset, |this| this.px_2())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue