diff --git a/crates/collab_ui2/src/collab_titlebar_item.rs b/crates/collab_ui2/src/collab_titlebar_item.rs index c9d16c7a5de68a7004980c4abb1a9dd0f25a8279..ca5118cd8de5d4c04b251bcedf4fb58509dd64f9 100644 --- a/crates/collab_ui2/src/collab_titlebar_item.rs +++ b/crates/collab_ui2/src/collab_titlebar_item.rs @@ -31,9 +31,9 @@ use std::sync::Arc; use call::ActiveCall; use client::{Client, UserStore}; use gpui::{ - div, rems, AppContext, Component, Div, InteractiveComponent, Model, ParentComponent, Render, - Stateful, StatefulInteractiveComponent, Styled, Subscription, ViewContext, VisualContext, - WeakView, WindowBounds, + div, px, rems, AppContext, Component, Div, InteractiveComponent, Model, ParentComponent, + Render, Stateful, StatefulInteractiveComponent, Styled, Subscription, ViewContext, + VisualContext, WeakView, WindowBounds, }; use project::Project; use theme::ActiveTheme; @@ -88,12 +88,17 @@ impl Render for CollabTitlebarItem { h_stack() .id("titlebar") .justify_between() + .w_full() + .h(rems(1.75)) + // 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), - |s| s.pl_20(), + // 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.)), ) - .w_full() - .h(rems(1.75)) .bg(cx.theme().colors().title_bar_background) .on_click(|_, event, cx| { if event.up.click_count == 2 { @@ -102,6 +107,7 @@ impl Render for CollabTitlebarItem { }) .child( h_stack() + .gap_1() // TODO - Add player menu .child( div() diff --git a/crates/ui2/src/components/button.rs b/crates/ui2/src/components/button.rs index 397ce4f4c48314339e340f717ebccddda63453e4..de055bcd5c3f185a7c049cb58eaa64f523fec9e5 100644 --- a/crates/ui2/src/components/button.rs +++ b/crates/ui2/src/components/button.rs @@ -178,6 +178,7 @@ impl Button { .text_ui() .rounded_md() .bg(self.variant.bg_color(cx)) + .cursor_pointer() .hover(|style| style.bg(self.variant.bg_color_hover(cx))) .active(|style| style.bg(self.variant.bg_color_active(cx))); diff --git a/crates/ui2/src/components/icon_button.rs b/crates/ui2/src/components/icon_button.rs index 4408c51f62128cbe27b76dcd28f976b225abedda..5512da2b34638e25e6450fd92f59b4a8d60c23f6 100644 --- a/crates/ui2/src/components/icon_button.rs +++ b/crates/ui2/src/components/icon_button.rs @@ -72,7 +72,7 @@ impl IconButton { fn render(mut self, _view: &mut V, cx: &mut ViewContext) -> impl Component { let icon_color = match (self.state, self.color) { (InteractionState::Disabled, _) => TextColor::Disabled, - (InteractionState::Active, _) => TextColor::Error, + (InteractionState::Active, _) => TextColor::Selected, _ => self.color, }; @@ -95,17 +95,16 @@ impl IconButton { .rounded_md() .p_1() .bg(bg_color) + .cursor_pointer() .hover(|style| style.bg(bg_hover_color)) .active(|style| style.bg(bg_active_color)) .child(IconElement::new(self.icon).color(icon_color)); if let Some(click_handler) = self.handlers.click.clone() { - button = button - .on_mouse_down(MouseButton::Left, move |state, event, cx| { - cx.stop_propagation(); - click_handler(state, cx); - }) - .cursor_pointer(); + button = button.on_mouse_down(MouseButton::Left, move |state, event, cx| { + cx.stop_propagation(); + click_handler(state, cx); + }) } if let Some(tooltip) = self.tooltip.take() { diff --git a/crates/workspace2/src/dock.rs b/crates/workspace2/src/dock.rs index 8e7f08252c80d8d69a3349dbe21daf2be18eb780..ee45ca862c96a4ca034645748ca4ac730c40223e 100644 --- a/crates/workspace2/src/dock.rs +++ b/crates/workspace2/src/dock.rs @@ -7,6 +7,7 @@ use gpui::{ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::sync::Arc; +use theme2::ActiveTheme; use ui::{h_stack, IconButton, InteractionState, Tooltip}; pub enum PanelEvent { @@ -443,10 +444,16 @@ impl Render for Dock { let size = entry.panel.size(cx); div() + .border_color(cx.theme().colors().border) .map(|this| match self.position().axis() { Axis::Horizontal => this.w(px(size)).h_full(), Axis::Vertical => this.h(px(size)).w_full(), }) + .map(|this| match self.position() { + DockPosition::Left => this.border_r(), + DockPosition::Right => this.border_l(), + DockPosition::Bottom => this.border_t(), + }) .child(entry.panel.to_any()) } else { div() @@ -675,7 +682,7 @@ impl Render for PanelButtons { Some(button) }); - h_stack().children(buttons) + h_stack().gap_0p5().children(buttons) } }