From 50a44dd8ba1d04bc9a69d9292b662e6d1e10d8e7 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Fri, 15 Dec 2023 11:07:17 -0500 Subject: [PATCH 1/4] Improve tooltip with keybinding styling --- crates/ui2/src/components/tooltip.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui2/src/components/tooltip.rs b/crates/ui2/src/components/tooltip.rs index 7c502ac5cb13a4322db626602feedcd34edccdce..0a8eb8d6be5bc6f6e806a5ad153ea038a23f2b44 100644 --- a/crates/ui2/src/components/tooltip.rs +++ b/crates/ui2/src/components/tooltip.rs @@ -78,13 +78,13 @@ impl Render for Tooltip { v_stack() .elevation_2(cx) .font(ui_font) - .text_ui_sm() + .text_ui() .text_color(cx.theme().colors().text) .py_1() .px_2() .child( h_stack() - .gap_2() + .gap_4() .child(self.title.clone()) .when_some(self.key_binding.clone(), |this, key_binding| { this.justify_between().child(key_binding) From 47eaf1abd88863767233df4a843219d65944d2a8 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Fri, 15 Dec 2023 11:07:40 -0500 Subject: [PATCH 2/4] Remove red borders, improve left side padding --- crates/collab_ui2/src/collab_titlebar_item.rs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/crates/collab_ui2/src/collab_titlebar_item.rs b/crates/collab_ui2/src/collab_titlebar_item.rs index b127708fa690dfc4976c8df246c9d3afa7b3f1a4..7ce3502c7dbc8f76fc8e04690282e45f64dddb03 100644 --- a/crates/collab_ui2/src/collab_titlebar_item.rs +++ b/crates/collab_ui2/src/collab_titlebar_item.rs @@ -74,12 +74,16 @@ impl Render for CollabTitlebarItem { // Set a non-scaling min-height here to ensure the titlebar is // always at least the height of the traffic lights. .min_h(px(32.)) - .when( - !matches!(cx.window_bounds(), WindowBounds::Fullscreen), - // Use pixels here instead of a rem-based size because the macOS traffic - // lights are a static size, and don't scale with the rest of the UI. - |s| s.pl(px(68.)), - ) + .pl_2() + .map(|this| { + if matches!(cx.window_bounds(), WindowBounds::Fullscreen) { + this.pl_2() + } else { + // Use pixels here instead of a rem-based size because the macOS traffic + // lights are a static size, and don't scale with the rest of the UI. + this.pl(px(72.)) + } + }) .bg(cx.theme().colors().title_bar_background) .on_click(|event, cx| { if event.up.click_count == 2 { @@ -325,8 +329,6 @@ impl CollabTitlebarItem { let name = util::truncate_and_trailoff(name, MAX_PROJECT_NAME_LENGTH); div() - .border() - .border_color(gpui::red()) .child( Button::new("project_name_trigger", name) .style(ButtonStyle::Subtle) @@ -365,10 +367,9 @@ impl CollabTitlebarItem { Some( div() - .border() - .border_color(gpui::red()) .child( Button::new("project_branch_trigger", branch_name) + .color(Color::Muted) .style(ButtonStyle::Subtle) .tooltip(move |cx| { Tooltip::with_meta( From d099d359488c9ffd890857c44dd986c052ca8d87 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Fri, 15 Dec 2023 11:20:56 -0500 Subject: [PATCH 3/4] Reduce intensity of project panel icons --- crates/project_panel2/src/project_panel.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/project_panel2/src/project_panel.rs b/crates/project_panel2/src/project_panel.rs index 2d18d2a6c769396d699ee3059e48f2736a85370a..d8b5c1551f4ef33495e7d84b168a702182479017 100644 --- a/crates/project_panel2/src/project_panel.rs +++ b/crates/project_panel2/src/project_panel.rs @@ -1389,7 +1389,9 @@ impl ProjectPanel { entry_id: *entry_id, }) }) - .drag_over::(|style| style.bg(cx.theme().colors().ghost_element_hover)) + .drag_over::(|style| { + style.bg(cx.theme().colors().drop_target_background) + }) .on_drop(cx.listener(move |this, dragged_id: &ProjectEntryId, cx| { this.move_entry(*dragged_id, entry_id, kind.is_file(), cx); })) @@ -1399,7 +1401,7 @@ impl ProjectPanel { .indent_step_size(px(settings.indent_size)) .selected(is_selected) .child(if let Some(icon) = &icon { - div().child(IconElement::from_path(icon.to_string())) + div().child(IconElement::from_path(icon.to_string()).color(Color::Muted)) } else { div() }) From 6345e6d4d2857a182d98875c24ea7daf4587b9ac Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Fri, 15 Dec 2023 11:25:24 -0500 Subject: [PATCH 4/4] Add some right side padding in titlebar. --- crates/collab_ui2/src/collab_titlebar_item.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/collab_ui2/src/collab_titlebar_item.rs b/crates/collab_ui2/src/collab_titlebar_item.rs index 7ce3502c7dbc8f76fc8e04690282e45f64dddb03..706749b28d349a2b9b30d51375c7818ec1031296 100644 --- a/crates/collab_ui2/src/collab_titlebar_item.rs +++ b/crates/collab_ui2/src/collab_titlebar_item.rs @@ -169,6 +169,7 @@ impl Render for CollabTitlebarItem { .child( h_stack() .gap_1() + .pr_1() .when_some(room, |this, room| { let room = room.read(cx); let is_shared = self.project.read(cx).is_shared();