diff --git a/apps/desktop-gpui/README.md b/apps/desktop-gpui/README.md index 76459042c1c..4ad6875bb72 100644 --- a/apps/desktop-gpui/README.md +++ b/apps/desktop-gpui/README.md @@ -305,13 +305,17 @@ must retain the dirty draft and expose reload/merge recovery. The native app uses calibrated, consistent corner radii from `ui::theme::radius` (`XS` 2 px, `SM` 4 px, `MD` 6 px, `LG` 8 px, `XL` 12 px, `FULL` pill/circle) while leaving full-window -roots, split-pane dividers, edge-to-edge banners, and hairlines sharp. `clippy.toml` disallows -GPUI's uncalibrated Tailwind rounding shortcuts (`rounded_sm`, `rounded_md`, etc.) so rounded -surfaces go through `ui::theme::radius`. Motion remains near-instant: functional transitions, -such as a toast entering or leaving and the chat panel's reveal, take 70 ms with linear easing; -decorative reveals are gone. Continuous indicators (spinners, audio meters, the recording pulse -and progress) keep their timing. Parity comparisons judge layout, copy and behavior, not exact -web radii or easing. +roots, split-pane dividers, edge-to-edge banners, and hairlines sharp. Single-line interactive +controls (buttons, icon buttons, single-line inputs/search, selects, segmented controls, +chips/badges, collapsed chat bar) and single-line nav/menu rows use `radius::FULL` +(pills/circles), while containers (cards, popovers, dialogs, textareas, multi-line rows) keep +calibrated rounded-rectangle radii (`SM`–`XL`). `clippy.toml` disallows GPUI's uncalibrated +Tailwind rounding shortcuts (`rounded_sm`, `rounded_md`, etc.) so rounded surfaces go through +`ui::theme::radius`. Motion remains near-instant: functional transitions, such as a toast +entering or leaving and the chat panel's reveal, take 70 ms with linear easing; decorative +reveals are gone. Continuous indicators (spinners, audio meters, the recording pulse and +progress) keep their timing. Parity comparisons judge layout, copy and behavior, not exact web +radii or easing. ## Visual parity diff --git a/apps/desktop-gpui/src/application.rs b/apps/desktop-gpui/src/application.rs index b7bd833f949..15438f85ea6 100644 --- a/apps/desktop-gpui/src/application.rs +++ b/apps/desktop-gpui/src/application.rs @@ -2359,8 +2359,9 @@ impl Render for ApplicationView { .id("hide-meeting") .a11y_button(hide.text) .a11y_language(hide.locale) - .p_2() - .rounded(crate::ui::theme::radius::MD) + .px_3() + .py_2() + .rounded(crate::ui::theme::radius::FULL) .cursor_pointer() .child(hide.text) .on_click(cx.listener(|this, _, _, cx| { diff --git a/apps/desktop-gpui/src/application/chrome.rs b/apps/desktop-gpui/src/application/chrome.rs index 34f7318908a..cbedd8b2e73 100644 --- a/apps/desktop-gpui/src/application/chrome.rs +++ b/apps/desktop-gpui/src/application/chrome.rs @@ -283,7 +283,7 @@ impl ApplicationView { .ml_2() .size(px(28.)) .id("title-sidebar") - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -310,7 +310,7 @@ impl ApplicationView { .a11y_language(label.locale) .w(px(46.)) .h(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -473,9 +473,9 @@ impl ApplicationView { .id(("application-menu-entry", index)) .a11y_menu_item(label.text) .a11y_language(label.locale) - .px_2() + .px_3() .py(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_between() diff --git a/apps/desktop-gpui/src/application/instruction.rs b/apps/desktop-gpui/src/application/instruction.rs index c50e30a1d48..bcae6a6724c 100644 --- a/apps/desktop-gpui/src/application/instruction.rs +++ b/apps/desktop-gpui/src/application/instruction.rs @@ -294,7 +294,7 @@ impl Instruction { .a11y_language(back.locale) .h(px(36.)) .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .gap(px(6.)) @@ -329,7 +329,7 @@ impl Instruction { .w_full() .h(px(40.)) .px_4() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -410,8 +410,8 @@ impl Instruction { .child( div() .h(px(40.)) - .px_3() - .rounded(radius::MD) + .px_4() + .rounded(radius::FULL) .flex() .items_center() .border_1() @@ -431,7 +431,7 @@ impl Instruction { .a11y_disabled_language(!enabled, submit.locale) .h(px(40.)) .px_4() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() diff --git a/apps/desktop-gpui/src/application/lock.rs b/apps/desktop-gpui/src/application/lock.rs index bdf4fff8d99..eb387d206e3 100644 --- a/apps/desktop-gpui/src/application/lock.rs +++ b/apps/desktop-gpui/src/application/lock.rs @@ -740,7 +740,7 @@ fn screen_for_locale( .mt_6() .h(px(36.)) .px_4() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() diff --git a/apps/desktop-gpui/src/application/startup.rs b/apps/desktop-gpui/src/application/startup.rs index 145524a6aa4..a32d8360751 100644 --- a/apps/desktop-gpui/src/application/startup.rs +++ b/apps/desktop-gpui/src/application/startup.rs @@ -414,7 +414,7 @@ pub fn gate(window: &mut Window, cx: &mut App) -> Option
{ .a11y_button(copy_label) .h(px(36.)) .px_4() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -451,7 +451,7 @@ pub fn gate(window: &mut Window, cx: &mut App) -> Option
{ .a11y_language(quit.locale) .h(px(36.)) .px_4() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() diff --git a/apps/desktop-gpui/src/application/toasts.rs b/apps/desktop-gpui/src/application/toasts.rs index 2c3224cfb08..7e8ad77ae0b 100644 --- a/apps/desktop-gpui/src/application/toasts.rs +++ b/apps/desktop-gpui/src/application/toasts.rs @@ -450,9 +450,9 @@ fn button( .id(id) .min_h(px(28.)) .min_w_0() - .px(px(10.)) + .px_3() .py(px(4.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() diff --git a/apps/desktop-gpui/src/chat/composer.rs b/apps/desktop-gpui/src/chat/composer.rs index 7f0c446d12d..3898c683c0a 100644 --- a/apps/desktop-gpui/src/chat/composer.rs +++ b/apps/desktop-gpui/src/chat/composer.rs @@ -812,14 +812,19 @@ impl Composer { ) -> AnyElement { let attr = |key| node.attr(key).and_then(Value::as_str).unwrap_or_default(); let thumbnail = self.thumbnails.get(attr("id")).cloned(); + let has_thumbnail = thumbnail.is_some(); div() .mt(px(-1.)) .flex() .items_center() .gap_1() - .px(px(6.)) + .when_else( + has_thumbnail, + |view| view.pl(px(4.)).pr_2(), + |view| view.px_2(), + ) .py(px(2.)) - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .bg(colors.muted) @@ -859,7 +864,7 @@ impl Composer { }) .flex_shrink_0() .p(px(2.)) - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_mouse_down( @@ -1065,8 +1070,8 @@ impl Composer { .a11y_press(cx, move |this, _, cx| this.insert_mention(index, cx)) .w_full() .h(px(32.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap(px(6.)) diff --git a/apps/desktop-gpui/src/chat/markdown.rs b/apps/desktop-gpui/src/chat/markdown.rs index 75a93057f4a..beb40a7a382 100644 --- a/apps/desktop-gpui/src/chat/markdown.rs +++ b/apps/desktop-gpui/src/chat/markdown.rs @@ -556,9 +556,9 @@ fn render_block(block: &Block, style: &Style, id: &str) -> AnyElement { .flex() .items_center() .gap_2() - .px(px(6.)) + .px_2() .py_1() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .child(download_button( @@ -917,7 +917,7 @@ fn control( .a11y_disabled(style.streaming) .group(group.clone()) .p_1() - .rounded(radius::SM) + .rounded(radius::FULL) .when(style.streaming, |view| view.opacity(0.5)) .when(!style.streaming, |view| view.cursor_pointer()) .child( diff --git a/apps/desktop-gpui/src/chat/view.rs b/apps/desktop-gpui/src/chat/view.rs index 95bc9c628b3..5218ecc5751 100644 --- a/apps/desktop-gpui/src/chat/view.rs +++ b/apps/desktop-gpui/src/chat/view.rs @@ -160,7 +160,7 @@ pub fn overlay( .flex() .items_center() .px_4() - .rounded(radius::XL) + .rounded(radius::FULL) .border_1() .border_color(colors.border.opacity(0.7)) .bg(if dark(window) { @@ -320,7 +320,7 @@ impl ChatView { .a11y_language(label.locale) .group(id) .size(px(size)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .flex_none() .items_center() @@ -397,8 +397,8 @@ impl ChatView { .relative() .h(px(button)) .ml(px(-8.)) - .px(px(10.)) - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .flex_none() .items_center() @@ -721,7 +721,7 @@ impl ChatView { .a11y_button(copy_message_label.text) .a11y_language(copy_message_label.locale) .p_1() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .on_click(cx.listener(move |this, _, _, cx| { this.copy(id.clone(), text.clone(), cx) @@ -739,7 +739,7 @@ impl ChatView { .a11y_button(regenerate_message_label.text) .a11y_language(regenerate_message_label.locale) .p_1() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .on_click( cx.listener(|this, _, _, cx| this.regenerate(cx)), @@ -826,7 +826,7 @@ impl ChatView { .gap(px(6.)) .px_3() .py(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.primary) .bg(colors.primary) @@ -940,8 +940,8 @@ impl ChatView { .items_center() .gap(px(6.)) .py_2() - .pr_3() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .cursor_pointer() .text_sm() .line_height(px(20.)) @@ -1260,9 +1260,9 @@ impl ChatView { .flex() .items_center() .gap_2() - .px_2() + .px_3() .py_1() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .line_height(px(16.)) .text_color(colors.muted_foreground) @@ -1284,7 +1284,7 @@ impl ChatView { .id(SharedString::from(format!("chat-queued-remove-{id}"))) .a11y_button(format!("Remove queued message: {text}")) .size(px(24.)) - .rounded(radius::SM) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -1786,7 +1786,7 @@ impl ChatView { .a11y_language(close_label.locale) .group("chat-table-fullscreen-close") .p_1() - .rounded(radius::MD) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.muted)) .on_click(cx.listener(|this, _, _, cx| { diff --git a/apps/desktop-gpui/src/editor/app_link.rs b/apps/desktop-gpui/src/editor/app_link.rs index 1f05b8628e2..3c8c589a5e5 100644 --- a/apps/desktop-gpui/src/editor/app_link.rs +++ b/apps/desktop-gpui/src/editor/app_link.rs @@ -375,14 +375,14 @@ pub fn reserve( } impl Chip { - /// `border`, `px-1.5`, the mark, then `gap-1.5` between the mark, header and subline. + /// `border`, `px-2`, the mark, then `gap-1.5` between the mark, header and subline. fn width(&self) -> Pixels { let mark = if self.mark == Mark::Checkbox { 20. } else { 14. }; - px(2. + 12. + mark + 6. + 6.) + self.header.width + self.subline.width + px(2. + 16. + mark + 6. + 6.) + self.header.width + self.subline.width } } @@ -457,7 +457,7 @@ fn paint_chip(hitbox: &Hitbox, chip: &Chip, colors: Theme, window: &mut Window, let bounds = hitbox.bounds; window.paint_quad(quad( bounds, - radius::clamped_quad_radii(radius::MD, bounds.size), + radius::clamped_quad_radii(radius::FULL, bounds.size), if hovered { colors.accent } else { @@ -468,7 +468,7 @@ fn paint_chip(hitbox: &Hitbox, chip: &Chip, colors: Theme, window: &mut Window, BorderStyle::Solid, )); let middle = bounds.center().y; - let mut x = bounds.left() + px(7.); + let mut x = bounds.left() + px(9.); let square = |x: Pixels, side: f32| { Bounds::new(point(x, middle - px(side / 2.)), size(px(side), px(side))) }; diff --git a/apps/desktop-gpui/src/editor/find.rs b/apps/desktop-gpui/src/editor/find.rs index 6e050f50a6e..da83420e142 100644 --- a/apps/desktop-gpui/src/editor/find.rs +++ b/apps/desktop-gpui/src/editor/find.rs @@ -456,7 +456,7 @@ impl FindBar { ) .a11y_disabled(disabled) .p(px(2.)) - .rounded(radius::SM) + .rounded(radius::FULL) .flex_shrink_0() .when(active, |view| view.bg(colors.accent)) .when(!disabled, |view| { @@ -488,11 +488,11 @@ impl Render for FindBar { let row = || { div() .h(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .gap(px(6.)) - .px_2() + .px_3() .bg(colors.muted) .text_xs() }; diff --git a/apps/desktop-gpui/src/editor/pane.rs b/apps/desktop-gpui/src/editor/pane.rs index 601f84d1195..8cc3df15665 100644 --- a/apps/desktop-gpui/src/editor/pane.rs +++ b/apps/desktop-gpui/src/editor/pane.rs @@ -3703,9 +3703,9 @@ impl EditorPane { .flex_shrink_0() .items_center() .gap_1() - .px_2() + .px(px(10.)) .py(px(3.)) - .rounded(crate::ui::theme::radius::MD) + .rounded(crate::ui::theme::radius::FULL) .border_1() .border_color(colors.border) .bg(if overlay { @@ -3759,9 +3759,9 @@ impl EditorPane { .flex_shrink_0() .items_center() .gap_1() - .px_2() + .px(px(10.)) .py(px(3.)) - .rounded(crate::ui::theme::radius::MD) + .rounded(crate::ui::theme::radius::FULL) .border_1() .border_color(if focused { colors.ring } else { colors.border }) .bg(if focused { @@ -5919,8 +5919,8 @@ impl Render for EditorPane { this.slash_commit(cx); }) .h(px(32.)) - .px_2() - .rounded(crate::ui::theme::radius::MD) + .px_3() + .rounded(crate::ui::theme::radius::FULL) .flex() .items_center() .gap(px(6.)) @@ -6001,8 +6001,8 @@ impl Render for EditorPane { this.commit_mention(cx); }) .h(px(32.)) - .px_2() - .rounded(crate::ui::theme::radius::MD) + .px_3() + .rounded(crate::ui::theme::radius::FULL) .flex() .items_center() .gap(px(6.)) @@ -6091,8 +6091,8 @@ impl Render for EditorPane { this.apply_spell_suggestion(&press_choice, window, cx); }) .h(px(28.)) - .px_2() - .rounded(crate::ui::theme::radius::MD) + .px_3() + .rounded(crate::ui::theme::radius::FULL) .flex() .items_center() .text_sm() @@ -6117,8 +6117,8 @@ impl Render for EditorPane { .a11y_menu_item("Ignore Spelling") .a11y_press(cx, |this, window, cx| this.ignore_spelling(window, cx)) .h(px(28.)) - .px_2() - .rounded(crate::ui::theme::radius::MD) + .px_3() + .rounded(crate::ui::theme::radius::FULL) .flex() .items_center() .text_sm() @@ -6140,8 +6140,8 @@ impl Render for EditorPane { .a11y_menu_item("Add to Dictionary") .a11y_press(cx, |this, window, cx| this.learn_spelling(window, cx)) .h(px(28.)) - .px_2() - .rounded(crate::ui::theme::radius::MD) + .px_3() + .rounded(crate::ui::theme::radius::FULL) .flex() .items_center() .text_sm() @@ -6479,7 +6479,7 @@ impl Render for EditorPane { .items_center() .gap(px(2.)) .p_1() - .rounded(crate::ui::theme::radius::LG) + .rounded(crate::ui::theme::radius::FULL) .border_1() .border_color(colors.border) .bg(colors.popover) @@ -6519,7 +6519,7 @@ impl Render for EditorPane { }) .group(kind) .size(px(28.)) - .rounded(crate::ui::theme::radius::MD) + .rounded(crate::ui::theme::radius::FULL) .flex() .items_center() .justify_center() @@ -6575,8 +6575,8 @@ impl Render for EditorPane { this.request_comment_on_selection(cx); }) .h(px(28.)) - .px_2() - .rounded(crate::ui::theme::radius::MD) + .px(px(10.)) + .rounded(crate::ui::theme::radius::FULL) .flex() .items_center() .gap(px(4.)) @@ -6633,9 +6633,9 @@ impl Render for EditorPane { .id("save-link") .a11y_button("Apply") .a11y_press(cx, |this, window, cx| this.commit_link(window, cx)) - .px_2() + .px_3() .py_1() - .rounded(crate::ui::theme::radius::MD) + .rounded(crate::ui::theme::radius::FULL) .text_sm() .cursor_pointer() .child("Apply") @@ -6652,9 +6652,9 @@ impl Render for EditorPane { .id("remove-link") .a11y_button("Remove") .a11y_press(cx, |this, window, cx| this.remove_link(window, cx)) - .px_2() + .px_3() .py_1() - .rounded(crate::ui::theme::radius::MD) + .rounded(crate::ui::theme::radius::FULL) .text_sm() .cursor_pointer() .child("Remove") diff --git a/apps/desktop-gpui/src/editor/transcript.rs b/apps/desktop-gpui/src/editor/transcript.rs index d9a09985268..4741eb17677 100644 --- a/apps/desktop-gpui/src/editor/transcript.rs +++ b/apps/desktop-gpui/src/editor/transcript.rs @@ -1002,8 +1002,8 @@ fn button( .id(id) .a11y_button(label) .h_7() - .px_2() - .rounded(crate::ui::theme::radius::MD) + .px_3() + .rounded(crate::ui::theme::radius::FULL) .flex() .items_center() .gap_2() @@ -1317,8 +1317,8 @@ impl TranscriptView { .flex() .items_center() .gap(px(6.)) - .px_2() - .rounded(crate::ui::theme::radius::MD) + .px_3() + .rounded(crate::ui::theme::radius::FULL) .whitespace_nowrap() .font_weight(crate::ui::theme::MEDIUM) }; @@ -1332,7 +1332,7 @@ impl TranscriptView { .gap_2() .p_1() .pl_3() - .rounded(crate::ui::theme::radius::LG) + .rounded(crate::ui::theme::radius::FULL) .border_1() .border_color(colors.border) .bg(colors.card) @@ -1352,7 +1352,6 @@ impl TranscriptView { ) .child( action("transcript-selection-speaker") - .px_3() .bg(colors.primary) .text_color(colors.primary_foreground) .when_else( @@ -1421,7 +1420,7 @@ impl TranscriptView { .a11y_button(clear_selection.text) .a11y_language(clear_selection.locale) .size_7() - .rounded(crate::ui::theme::radius::MD) + .rounded(crate::ui::theme::radius::FULL) .flex_shrink_0() .flex() .items_center() @@ -2366,7 +2365,7 @@ impl TranscriptView { .a11y_disabled(disabled) .h(px(30.)) .px_3() - .rounded(crate::ui::theme::radius::MD) + .rounded(crate::ui::theme::radius::FULL) .flex() .items_center() .text_sm() diff --git a/apps/desktop-gpui/src/editor/transcript/speakers.rs b/apps/desktop-gpui/src/editor/transcript/speakers.rs index b54f32a306a..53f06799d48 100644 --- a/apps/desktop-gpui/src/editor/transcript/speakers.rs +++ b/apps/desktop-gpui/src/editor/transcript/speakers.rs @@ -677,7 +677,7 @@ impl TranscriptView { .id("speaker-confirm") .h_8() .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .bg(colors.primary) diff --git a/apps/desktop-gpui/src/meeting/mod.rs b/apps/desktop-gpui/src/meeting/mod.rs index a1f61b88033..fdd4525f2a2 100644 --- a/apps/desktop-gpui/src/meeting/mod.rs +++ b/apps/desktop-gpui/src/meeting/mod.rs @@ -730,8 +730,8 @@ impl Render for MeetingPane { selector = selector.child( div() .id(SharedString::from(id.clone())) - .px_2() - .rounded(crate::ui::theme::radius::MD) + .px_3() + .rounded(crate::ui::theme::radius::FULL) .cursor_pointer() .when(assignment.human_id == *id, |view| view.bg(colors.accent)) .child(name.clone()) diff --git a/apps/desktop-gpui/src/meeting/player_view.rs b/apps/desktop-gpui/src/meeting/player_view.rs index 9b95bc0ea7c..906c61867aa 100644 --- a/apps/desktop-gpui/src/meeting/player_view.rs +++ b/apps/desktop-gpui/src/meeting/player_view.rs @@ -173,7 +173,7 @@ impl PlayerView { .a11y_disabled(disabled) .h(px(30.)) .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .text_sm() @@ -271,8 +271,8 @@ impl Render for PlayerView { .items_center() .gap_2() .py(px(6.)) - .pl_1() - .pr_3() + .pl(px(6.)) + .pr_4() .on_mouse_down( MouseButton::Right, cx.listener(|this, event: &MouseDownEvent, _, cx| { @@ -404,8 +404,8 @@ impl Render for PlayerView { .a11y_button(format!("Playback speed, {}x", self.snapshot.rate)) .aria_expanded(self.rates_open) .h_6() - .px(px(6.)) - .rounded(radius::MD) + .px_2() + .rounded(radius::FULL) .flex() .flex_shrink_0() .items_center() @@ -483,7 +483,7 @@ impl Render for PlayerView { .absolute() .right(px(12.)) .bottom(px(36.)) - .py_1() + .p_1() .overflow_hidden() .rounded(radius::LG) .border_1() @@ -497,6 +497,7 @@ impl Render for PlayerView { .a11y_menu_radio(format!("{rate}x"), current) .px_3() .py_1() + .rounded(radius::FULL) .font_family(mono.clone()) .text_xs() .cursor_pointer() diff --git a/apps/desktop-gpui/src/product/account_view.rs b/apps/desktop-gpui/src/product/account_view.rs index af4d80739df..c1c034e2644 100644 --- a/apps/desktop-gpui/src/product/account_view.rs +++ b/apps/desktop-gpui/src/product/account_view.rs @@ -229,7 +229,7 @@ fn destructive_button( .flex_shrink_0() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .bg(colors.destructive) .text_color(colors.destructive_foreground) .shadow_xs() @@ -257,12 +257,12 @@ fn small_outline( .a11y_button(label.text) .a11y_language(label.locale) .h(px(28.)) - .px_2() + .px_3() .flex() .flex_shrink_0() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.background) @@ -666,7 +666,7 @@ impl ProductPane { .px_6() .flex() .items_center() - .rounded(radius::LG) + .rounded(radius::FULL) .border_2() .border_color(colors.primary) .bg(colors.primary) @@ -866,7 +866,7 @@ impl ProductPane { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.border.opacity(0.7)) .bg(colors.background.opacity(0.5)) @@ -893,7 +893,7 @@ impl ProductPane { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .bg(colors.destructive) .text_color(colors.destructive_foreground) .text_xs() @@ -1401,7 +1401,7 @@ impl ProductPane { .flex() .items_center() .gap(px(2.)) - .rounded(radius::LG) + .rounded(radius::FULL) .bg(colors.muted) .children(options.into_iter().map(|(yearly, label)| { let selected = self.account_ui.yearly == yearly; @@ -1411,9 +1411,9 @@ impl ProductPane { } else { "period-monthly" }) - .px(px(10.)) + .px_3() .py_1() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .line_height(px(16.)) .font_weight(crate::ui::theme::MEDIUM) @@ -2057,11 +2057,11 @@ impl ProductPane { .a11y_button(refresh.text) .a11y_language(refresh.locale) .h(px(28.)) - .px_2() + .px_3() .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .font_weight(crate::ui::theme::MEDIUM) .cursor_pointer() diff --git a/apps/desktop-gpui/src/product/cloud/sync_view.rs b/apps/desktop-gpui/src/product/cloud/sync_view.rs index 8c581a0aa75..38276af3cf4 100644 --- a/apps/desktop-gpui/src/product/cloud/sync_view.rs +++ b/apps/desktop-gpui/src/product/cloud/sync_view.rs @@ -1075,7 +1075,7 @@ impl SyncView { .flex() .items_center() .justify_center() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .child(controls::icon( diff --git a/apps/desktop-gpui/src/product/cloud/teams_view.rs b/apps/desktop-gpui/src/product/cloud/teams_view.rs index f4843ebf2a5..72928eeaa0b 100644 --- a/apps/desktop-gpui/src/product/cloud/teams_view.rs +++ b/apps/desktop-gpui/src/product/cloud/teams_view.rs @@ -1300,10 +1300,10 @@ pub(super) fn button( .items_center() .justify_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .font_weight(MEDIUM) .text_color(foreground) - .when(small, |view| view.h(px(28.)).px_2().text_xs()) + .when(small, |view| view.h(px(28.)).px_3().text_xs()) .when(!small, |view| view.h(px(36.)).px_4().text_sm()) .when_some(background, |view, background| view.bg(background)) .when(variant != Variant::Ghost, |view| view.shadow_xs()) @@ -1337,7 +1337,7 @@ pub(super) fn field(input: &Entity, colors: &Theme) -> Div { .px_3() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.card) @@ -1475,12 +1475,12 @@ fn menu_item( div() .id(id) .w_full() - .px_2() + .px_3() .py(px(6.)) .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .text_color(color) .cursor_pointer() @@ -2583,7 +2583,7 @@ impl TeamsView { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .child(controls::icon( "product/MoreHorizontalIcon.svg", 16., @@ -2808,7 +2808,7 @@ impl TeamsView { .flex() .items_center() .overflow_hidden() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.card) @@ -2823,9 +2823,11 @@ impl TeamsView { .child( div() .h_full() - .px_3() + .pl_3() + .pr_4() .flex() .items_center() + .rounded_r(radius::FULL) .border_l_1() .border_color(colors.input) .bg(colors.muted) diff --git a/apps/desktop-gpui/src/product/cloud/view.rs b/apps/desktop-gpui/src/product/cloud/view.rs index 4a070b9503f..fbe6c7ae790 100644 --- a/apps/desktop-gpui/src/product/cloud/view.rs +++ b/apps/desktop-gpui/src/product/cloud/view.rs @@ -400,7 +400,7 @@ impl Render for CloudView { let operation = operation.clone(); div() .id(SharedString::from(operation.id.clone())) - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .px_3() @@ -495,7 +495,7 @@ impl Render for CloudView { .map(|(kind, label, action)| { div() .id(kind) - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .px_3() @@ -526,10 +526,10 @@ impl Render for CloudView { .child(snapshot("remote-snapshot", format!("Published: {}", review.remote_title), review.remote_preview))) .child(div().text_xs().child("Both original documents remain intact. Publishing local changes replaces the reviewed web revision; newer edits produce another conflict.")) .child(div().flex().gap_3() - .child(div().id("keep-remote").px_3().py_2().rounded(radius::MD).border_1().border_color(colors.border).child("Keep web copy; retain local draft") + .child(div().id("keep-remote").px_3().py_2().rounded(radius::FULL).border_1().border_color(colors.border).child("Keep web copy; retain local draft") .a11y_button("Keep web copy; retain local draft") .when(!busy, |view| view.cursor_pointer().on_click(cx.listener(|this, _, _, cx| this.resolve(ConflictDecision::KeepRemote, cx))))) - .child(div().id("publish-local").px_3().py_2().rounded(radius::MD).bg(colors.accent).child("Replace reviewed web copy with local draft") + .child(div().id("publish-local").px_3().py_2().rounded(radius::FULL).bg(colors.accent).child("Replace reviewed web copy with local draft") .a11y_button("Replace reviewed web copy with local draft") .when(!busy, |view| view.cursor_pointer().on_click(cx.listener(|this, _, _, cx| this.resolve(ConflictDecision::PublishLocal, cx)))))); } @@ -568,7 +568,7 @@ impl Render for CloudView { .id(SharedString::from(format!("{}-{choice}", field.id))) .px_3() .py_1() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .when(input.read(cx).buffer.text == choice, |view| { @@ -611,7 +611,7 @@ impl Render for CloudView { .a11y_language(cancel.locale) .px_3() .py_2() - .rounded(radius::MD) + .rounded(radius::FULL) .child(cancel.text) .when(!busy, |view| { view.cursor_pointer() @@ -629,7 +629,7 @@ impl Render for CloudView { .a11y_language(confirm.locale) .px_3() .py_2() - .rounded(radius::MD) + .rounded(radius::FULL) .bg(colors.accent) .child(confirm.text) .when(!busy, |view| { diff --git a/apps/desktop-gpui/src/product/controls.rs b/apps/desktop-gpui/src/product/controls.rs index e952c89755e..5ade02eedef 100644 --- a/apps/desktop-gpui/src/product/controls.rs +++ b/apps/desktop-gpui/src/product/controls.rs @@ -181,7 +181,7 @@ pub fn outline_button( .items_center() .justify_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.background) @@ -224,13 +224,12 @@ pub fn select_trigger( .a11y_disabled(!enabled) .w_full() .h(px(36.)) - .pl_3() - .pr_2() + .px_3() .flex() .items_center() .justify_between() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.card) @@ -442,12 +441,12 @@ pub fn select_item( .relative() .w_full() .py(px(6.)) - .pl_2() + .pl_3() .pr_8() .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .cursor_pointer() .hover(move |style| style.bg(hover)) @@ -457,7 +456,7 @@ pub fn select_item( .absolute() .top_0() .bottom_0() - .right_2() + .right_3() .flex() .items_center() .child(icon("product/CheckIcon.svg", 16., colors.foreground)), @@ -502,11 +501,11 @@ pub fn command_item( .a11y_option(option_name(&label, &detail), selected) .w_full() .py(px(6.)) - .px_2() + .px_3() .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .cursor_pointer() .hover(move |style| style.bg(hover)) diff --git a/apps/desktop-gpui/src/product/crm.rs b/apps/desktop-gpui/src/product/crm.rs index 5b881165e5f..f99c783bb12 100644 --- a/apps/desktop-gpui/src/product/crm.rs +++ b/apps/desktop-gpui/src/product/crm.rs @@ -720,6 +720,8 @@ impl CrmView { ) .flex_1() .min_w_0() + .rounded_r(radius::FULL) + .px_3() .when(enabled, |button| { button.on_click( cx.listener(move |this, _: &ClickEvent, _, cx| this.connect(provider, cx)), diff --git a/apps/desktop-gpui/src/product/insights.rs b/apps/desktop-gpui/src/product/insights.rs index 5764d7278b6..d213c069988 100644 --- a/apps/desktop-gpui/src/product/insights.rs +++ b/apps/desktop-gpui/src/product/insights.rs @@ -411,7 +411,7 @@ impl InsightsView { .flex() .gap_1() .p_1() - .rounded(radius::LG) + .rounded(radius::FULL) .bg(colors.muted) .children( [ @@ -427,7 +427,7 @@ impl InsightsView { .id(label) .px_3() .py(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .line_height(px(16.)) .font_weight(crate::ui::theme::MEDIUM) @@ -886,10 +886,10 @@ impl InsightsView { .a11y_button(try_again.text) .a11y_language(try_again.locale) .h_7() - .px_2() + .px_3() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .font_weight(crate::ui::theme::MEDIUM) .text_color(colors.foreground) .cursor_pointer() diff --git a/apps/desktop-gpui/src/product/local/developers_view.rs b/apps/desktop-gpui/src/product/local/developers_view.rs index 56d960ebb00..3c879eb2546 100644 --- a/apps/desktop-gpui/src/product/local/developers_view.rs +++ b/apps/desktop-gpui/src/product/local/developers_view.rs @@ -646,13 +646,13 @@ fn button( div() .id(id) .h(px(28.)) - .px_2() + .px_3() .flex() .flex_shrink_0() .items_center() .justify_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .line_height(px(16.)) .font_weight(MEDIUM) @@ -740,7 +740,7 @@ fn input_box(input: Entity, max_width: f32, colors: &Theme) -> Div { .px_3() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .text_sm() @@ -1000,12 +1000,12 @@ impl DevelopersView { let item = |id: ElementId, enabled: bool| { div() .id(id) - .px_2() + .px_3() .py(px(6.)) .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .line_height(px(20.)) .when(!enabled, |item| item.opacity(0.5)) diff --git a/apps/desktop-gpui/src/product/local/imports_view.rs b/apps/desktop-gpui/src/product/local/imports_view.rs index 4061ee1cd43..3d13c453b9a 100644 --- a/apps/desktop-gpui/src/product/local/imports_view.rs +++ b/apps/desktop-gpui/src/product/local/imports_view.rs @@ -485,7 +485,7 @@ pub(crate) fn connect_group( .h(px(28.)) .flex_none() .flex() - .rounded(radius::MD) + .rounded(radius::FULL) .overflow_hidden() .map(|group| { if primary { @@ -501,18 +501,21 @@ pub(crate) fn connect_group( .top_0() .bottom_0() .w(relative(1. / 3.)) + .rounded(radius::FULL) .bg(colors.primary_foreground.opacity(0.2)) .with_animation( ElementId::Name(format!("{id}-busy").into()), Animation::new(Duration::from_millis(1400)).repeat(), - |bar, delta| bar.left(relative(-1. / 3. + delta * 4. / 3.)), + |bar, delta| { + let edge = (delta * 5.).min((1. - delta) * 5.).clamp(0., 1.); + bar.left(relative(delta * 2. / 3.)).opacity(edge) + }, ), ) }) } -/// A `size="sm"` button inside a connect group. -pub(crate) fn group_button( +fn group_segment( id: impl Into, primary: bool, enabled: bool, @@ -542,6 +545,18 @@ pub(crate) fn group_button( }) } +/// A `size="sm"` button inside a connect group. +pub(crate) fn group_button( + id: impl Into, + primary: bool, + enabled: bool, + colors: &Theme, +) -> Stateful
{ + group_segment(id, primary, enabled, colors) + .px_1() + .rounded_l(radius::FULL) +} + /// The caret half of a connect group, with the divider shipping draws in `before:`. pub(crate) fn group_caret( id: impl Into, @@ -554,9 +569,11 @@ pub(crate) fn group_caret( } else { colors.foreground }; - group_button(id, primary, enabled, colors) + group_segment(id, primary, enabled, colors) .w(px(24.)) + .pr(px(1.)) .flex_none() + .rounded_r(radius::FULL) .when(enabled, |button| button.cursor_pointer()) .child( div() @@ -588,9 +605,9 @@ pub(crate) fn menu_entry( .flex() .items_center() .gap_2() - .px_2() + .px_3() .py(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .line_height(px(20.)) .when(!enabled, |item| item.opacity(0.5)) @@ -669,7 +686,7 @@ impl ImportsView { .items_center() .justify_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.background) @@ -841,13 +858,13 @@ impl ImportsView { } else { icon("product/ElectricPlugsIcon.svg", 14., text).into_any_element() }) - .child(if connecting { + .child(div().min_w_0().truncate().child(if connecting { cancel_label } else if checking { checking_label } else { connect_label - }) + })) }); let group = connect_group(format!("import-{id}"), signed_in, false, colors).child(button); @@ -1068,11 +1085,11 @@ impl Render for ImportsView { .a11y_button(documentation.text) .a11y_language(documentation.locale) .h(px(28.)) - .px_2() + .px_3() .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .font_weight(MEDIUM) .cursor_pointer() diff --git a/apps/desktop-gpui/src/product/local/view.rs b/apps/desktop-gpui/src/product/local/view.rs index c5090d9d200..d2b16f40bb5 100644 --- a/apps/desktop-gpui/src/product/local/view.rs +++ b/apps/desktop-gpui/src/product/local/view.rs @@ -347,7 +347,7 @@ impl LocalSettingsView { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .when(!granted, |view| { view.bg(colors.primary) .hover(|style| style.bg(colors.primary.opacity(0.9))) @@ -533,7 +533,7 @@ impl Render for LocalSettingsView { .a11y_radio(format.to_uppercase(), selected) .px_3() .py_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .when(selected, |v| v.bg(colors.accent)) @@ -602,7 +602,7 @@ impl Render for LocalSettingsView { .a11y_disabled(!enabled) .px_3() .py_2() - .rounded(radius::MD) + .rounded(radius::FULL) .bg(colors.accent) .text_sm() .child(operation.label.to_string()) diff --git a/apps/desktop-gpui/src/product/mod.rs b/apps/desktop-gpui/src/product/mod.rs index 6657dc76e27..4ff0d9eb1de 100644 --- a/apps/desktop-gpui/src/product/mod.rs +++ b/apps/desktop-gpui/src/product/mod.rs @@ -592,7 +592,7 @@ impl ProductPane { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_click(cx.listener(|this, _, _, cx| { @@ -615,7 +615,7 @@ impl ProductPane { .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .bg(if focused { @@ -727,7 +727,7 @@ impl ProductPane { .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .line_height(px(20.)) .cursor_pointer() diff --git a/apps/desktop-gpui/src/product/onboarding/view/sections.rs b/apps/desktop-gpui/src/product/onboarding/view/sections.rs index 87f3341755e..782f36f1d96 100644 --- a/apps/desktop-gpui/src/product/onboarding/view/sections.rs +++ b/apps/desktop-gpui/src/product/onboarding/view/sections.rs @@ -73,7 +73,7 @@ fn button(id: impl Into) -> Stateful
{ .gap_2() .px_6() .py(px(10.)) - .rounded(radius::LG) + .rounded(radius::FULL) .text_size(px(14.)) .line_height(px(20.)) .font_weight(crate::ui::theme::MEDIUM) @@ -102,7 +102,7 @@ fn secondary_button(id: impl Into, colors: &Theme) -> Stateful
{ .flex_none() .px_6() .py_2() - .rounded(radius::LG) + .rounded(radius::FULL) .border_1() .border_color(colors.border.opacity(0.6)) .bg(card.opacity(0.55)) @@ -410,9 +410,9 @@ impl OnboardingView { .flex() .items_center() .gap_3() - .px_3() + .px_4() .py(px(10.)) - .rounded(radius::LG) + .rounded(radius::FULL) .border_1() .map(|block| { if authorized { @@ -437,7 +437,7 @@ impl OnboardingView { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .when(!authorized, |icon| { icon.bg(colors.primary_foreground.opacity(0.1)) }) @@ -1021,7 +1021,7 @@ impl OnboardingView { .h(px(28.)) .flex_none() .flex() - .rounded(radius::MD) + .rounded(radius::FULL) .overflow_hidden() .bg(group_bg) .when(!signed_in, |group| { @@ -1041,7 +1041,9 @@ impl OnboardingView { .items_center() .justify_center() .gap_2() - .px_2() + .pl_3() + .pr_2() + .rounded_l(radius::FULL) .text_size(px(12.)) .font_weight(crate::ui::theme::MEDIUM) .text_color(text_color) @@ -1103,12 +1105,14 @@ impl OnboardingView { .id("onboarding-import-files") .a11y_button(more_import_options.text) .a11y_language(more_import_options.locale) - .w(px(24.)) + .w(px(26.)) .h_full() + .pr(px(2.)) .flex_none() .flex() .items_center() .justify_center() + .rounded_r(radius::FULL) .relative() .cursor_pointer() .child( @@ -1139,9 +1143,9 @@ impl OnboardingView { .flex() .items_center() .gap_2() - .px_2() + .px_3() .py(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .text_size(px(14.)) .line_height(px(20.)) .cursor_pointer() @@ -1516,7 +1520,7 @@ impl Render for OnboardingView { .a11y_button(mute_label.text) .a11y_language(mute_label.locale) .p(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_click(cx.listener(|this, _: &ClickEvent, _, cx| this.set_muted(cx))) diff --git a/apps/desktop-gpui/src/product/pages.rs b/apps/desktop-gpui/src/product/pages.rs index 6368ae06b49..140aafeec3b 100644 --- a/apps/desktop-gpui/src/product/pages.rs +++ b/apps/desktop-gpui/src/product/pages.rs @@ -1529,12 +1529,12 @@ impl PreferencesView { div() .id(("excluded-app-option", index)) .a11y_option(app.name.clone(), false) - .px_2() + .px_3() .py(px(6.)) .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .cursor_pointer() .hover(move |style| style.bg(hover)) @@ -2008,7 +2008,7 @@ impl PreferencesView { .flex() .items_center() .gap_1() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.background) @@ -2060,10 +2060,10 @@ impl PreferencesView { .a11y_button(label.text) .a11y_language(label.locale) .h(px(28.)) - .px_2() + .px_3() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.background) @@ -2335,7 +2335,7 @@ impl PreferencesView { .flex() .items_center() .gap_2() - .rounded(radius::LG) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .bg(colors.card) @@ -2355,11 +2355,11 @@ impl PreferencesView { .a11y_button(add_label.text) .a11y_disabled_language(!enabled, add_label.locale) .h(px(28.)) - .px_2() + .px_3() .flex() .items_center() .gap_1() - .rounded(radius::MD) + .rounded(radius::FULL) .bg(colors.foreground) .text_color(colors.background) .text_sm() @@ -2462,7 +2462,7 @@ impl PreferencesView { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .when(enabled, |view| { view.cursor_pointer().on_click(cx.listener( move |this, _, _, cx| { diff --git a/apps/desktop-gpui/src/product/profile.rs b/apps/desktop-gpui/src/product/profile.rs index 9673caab422..704cbc283b9 100644 --- a/apps/desktop-gpui/src/product/profile.rs +++ b/apps/desktop-gpui/src/product/profile.rs @@ -351,7 +351,7 @@ impl Render for ProfileCard { .when(multiline, |view| view.min_h(px(78.)).py_2().items_start()) .px_3() .flex() - .rounded(radius::MD) + .rounded(if multiline { radius::MD } else { radius::FULL }) .border_1() .border_color(colors.input) .text_sm() diff --git a/apps/desktop-gpui/src/product/providers.rs b/apps/desktop-gpui/src/product/providers.rs index d43c0832102..58ba16826e4 100644 --- a/apps/desktop-gpui/src/product/providers.rs +++ b/apps/desktop-gpui/src/product/providers.rs @@ -1779,7 +1779,7 @@ fn pill(colors: &Theme) -> Div { .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.card) @@ -1935,7 +1935,7 @@ impl Render for ProviderView { .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .bg(colors.accent.opacity(0.5)) diff --git a/apps/desktop-gpui/src/product/service_view.rs b/apps/desktop-gpui/src/product/service_view.rs index 64b4efe6d2b..2c5f7a27f4b 100644 --- a/apps/desktop-gpui/src/product/service_view.rs +++ b/apps/desktop-gpui/src/product/service_view.rs @@ -363,7 +363,11 @@ impl Render for ServiceView { .a11y_disabled(busy || reason.is_some()) .px_3() .py_2() - .rounded(radius::MD) + .rounded(if reason.is_some() { + radius::MD + } else { + radius::FULL + }) .bg(colors.accent) .child(label) .when_some(reason.clone(), |view, reason| { diff --git a/apps/desktop-gpui/src/product/sharing/comments.rs b/apps/desktop-gpui/src/product/sharing/comments.rs index a4e3ec3ec40..aa1bfd2b11f 100644 --- a/apps/desktop-gpui/src/product/sharing/comments.rs +++ b/apps/desktop-gpui/src/product/sharing/comments.rs @@ -707,7 +707,7 @@ impl CommentsPopover { .flex() .items_center() .justify_center() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .when(!deleting, |btn| { @@ -796,7 +796,7 @@ impl Render for CommentsPopover { .flex() .items_center() .justify_center() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_click(cx.listener(|this, _, _, cx| { @@ -816,7 +816,7 @@ impl Render for CommentsPopover { .flex() .items_center() .justify_center() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_click(cx.listener(|_, _, _, cx| { @@ -922,7 +922,7 @@ impl Render for CommentsPopover { .flex() .items_center() .justify_center() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_click(cx.listener(|this, _, _, cx| { diff --git a/apps/desktop-gpui/src/product/sharing/folder_access.rs b/apps/desktop-gpui/src/product/sharing/folder_access.rs index 9e97bf51a15..339bf936309 100644 --- a/apps/desktop-gpui/src/product/sharing/folder_access.rs +++ b/apps/desktop-gpui/src/product/sharing/folder_access.rs @@ -316,7 +316,7 @@ impl Render for FolderAccess { .items_center() .justify_between() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.card) @@ -412,7 +412,7 @@ impl FolderAccess { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .line_height(px(20.)) .font_weight(crate::ui::theme::MEDIUM) diff --git a/apps/desktop-gpui/src/product/sharing/popover.rs b/apps/desktop-gpui/src/product/sharing/popover.rs index 5606c8a310b..a8db8b67c14 100644 --- a/apps/desktop-gpui/src/product/sharing/popover.rs +++ b/apps/desktop-gpui/src/product/sharing/popover.rs @@ -773,13 +773,13 @@ pub(super) fn button( div() .id(id) .h(px(28.)) - .px_2() + .px_3() .flex() .flex_shrink_0() .items_center() .justify_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .line_height(px(16.)) .font_weight(crate::ui::theme::MEDIUM) @@ -900,11 +900,11 @@ pub(super) fn select_item( .relative() .w_full() .py(px(6.)) - .pl_2() + .pl_3() .pr_8() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .line_height(px(20.)) .when_some(color, |item, color| item.text_color(color)) @@ -918,7 +918,7 @@ pub(super) fn select_item( item.child( div() .absolute() - .right_2() + .right_3() .top_0() .bottom_0() .flex() @@ -1436,7 +1436,7 @@ impl SharePopover { .px_3() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) // GPUI paints shadows under the box, so it needs the panel's own fill. @@ -1601,7 +1601,7 @@ impl SharePopover { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .when(!disabled, |b| { b.cursor_pointer() .hover(|s| s.bg(colors.accent)) @@ -1671,10 +1671,10 @@ impl SharePopover { div() .id(SharedString::from(format!("share-deny-{id}"))) .h(px(28.)) - .px_2() + .px_3() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .font_weight(crate::ui::theme::MEDIUM) .cursor_pointer() @@ -1727,12 +1727,12 @@ impl SharePopover { .aria_value(entry.capability.label()) .h(px(28.)) .min_w(px(84.)) - .px(px(6.)) + .px(px(10.)) .flex() .items_center() .justify_between() .gap_1() - .rounded(radius::MD) + .rounded(radius::FULL) .text_size(px(11.)) .line_height(px(16.5)) .text_color(colors.muted_foreground) @@ -1871,7 +1871,7 @@ impl SharePopover { .flex() .items_center() .justify_center() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .on_click(cx.listener(|this, _, _, cx| { this.mode = Mode::Invite; @@ -2002,11 +2002,11 @@ impl SharePopover { .a11y_disabled_language(!select_enabled, general_access.locale) .h(px(28.)) .max_w_full() - .px(px(6.)) + .px(px(10.)) .flex() .items_center() .gap(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .line_height(px(16.)) .when_else( @@ -2054,7 +2054,7 @@ impl SharePopover { .flex() .items_center() .overflow_hidden() - .rounded(radius::MD) + .rounded(radius::FULL) .bg(colors.background) .shadow_xs() .child( @@ -2063,10 +2063,12 @@ impl SharePopover { .a11y_button(copy_link.text) .a11y_disabled_language(!copy_enabled, copy_link.locale) .h_full() - .px(px(10.)) + .pl_3() + .pr(px(10.)) .flex() .items_center() .gap_2() + .rounded_l(radius::FULL) .text_xs() .line_height(px(16.)) .font_weight(crate::ui::theme::MEDIUM) @@ -2100,10 +2102,12 @@ impl SharePopover { .a11y_language(more_options.locale) .group("share-more-options") .h_full() - .w(px(24.)) + .w(px(28.)) + .pr(px(2.)) .flex() .items_center() .justify_center() + .rounded_r(radius::FULL) .cursor_pointer() .hover(|s| s.bg(colors.accent)) .on_click(cx.listener(|this, _, _, cx| { @@ -2124,7 +2128,7 @@ impl SharePopover { div() .absolute() .inset_0() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input), ), @@ -2210,12 +2214,12 @@ impl SharePopover { let item = |id: &'static str, label: SharedString, glyph: AnyElement| { div() .id(id) - .px_2() + .px_3() .py(px(6.)) .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .line_height(px(20.)) .cursor_pointer() diff --git a/apps/desktop-gpui/src/product/sharing/resource_dialog.rs b/apps/desktop-gpui/src/product/sharing/resource_dialog.rs index cd24a0906e0..8070989dd49 100644 --- a/apps/desktop-gpui/src/product/sharing/resource_dialog.rs +++ b/apps/desktop-gpui/src/product/sharing/resource_dialog.rs @@ -402,7 +402,7 @@ impl ResourceShareDialog { .px_3() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.card.opacity(0.6)) @@ -714,10 +714,10 @@ impl ResourceShareDialog { div() .id(SharedString::from(format!("resource-guest-{id}"))) .h(px(28.)) - .px_2() + .px_3() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .font_weight(crate::ui::theme::MEDIUM) .when_else( @@ -757,11 +757,11 @@ impl ResourceShareDialog { div() .id("resource-share-stop") .h(px(28.)) - .px_2() + .px_3() .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .font_weight(crate::ui::theme::MEDIUM) .text_color(red) diff --git a/apps/desktop-gpui/src/product/sharing/shared_note.rs b/apps/desktop-gpui/src/product/sharing/shared_note.rs index 73bea027a06..1e025c5fdf5 100644 --- a/apps/desktop-gpui/src/product/sharing/shared_note.rs +++ b/apps/desktop-gpui/src/product/sharing/shared_note.rs @@ -2659,11 +2659,11 @@ impl Render for SharedNoteView { .a11y_button("Comments") .aria_expanded(comments_open) .h(px(28.)) - .px_2() + .px(px(10.)) .flex() .items_center() .gap(px(4.)) - .rounded(radius::MD) + .rounded(radius::FULL) .cursor_pointer() .text_xs() .text_color(if comments_open { diff --git a/apps/desktop-gpui/src/product/ticket.rs b/apps/desktop-gpui/src/product/ticket.rs index a674b83087b..908a2e32c44 100644 --- a/apps/desktop-gpui/src/product/ticket.rs +++ b/apps/desktop-gpui/src/product/ticket.rs @@ -311,10 +311,12 @@ impl PreferencesView { div() .id(group.clone()) .group(group.clone()) + .mx(px(-12.)) + .px_3() .flex() .items_center() .gap_1() - .rounded(radius::MD) + .rounded(radius::FULL) .cursor_pointer() .hover(move |style| style.bg(accent)) .on_click(cx.listener(move |this, _: &ClickEvent, _, cx| { @@ -540,7 +542,7 @@ impl PreferencesView { ))) .px_3() .py(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .text_color(muted) .cursor_pointer() @@ -585,7 +587,7 @@ impl PreferencesView { .px_3() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .shadow_xs() @@ -665,7 +667,7 @@ impl PreferencesView { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .bg(colors.primary) .when(self.ticket.requesting, |button| button.opacity(0.5)) .when(!self.ticket.requesting, |button| { diff --git a/apps/desktop-gpui/src/product/trial.rs b/apps/desktop-gpui/src/product/trial.rs index 9b89817f67e..7912a36d701 100644 --- a/apps/desktop-gpui/src/product/trial.rs +++ b/apps/desktop-gpui/src/product/trial.rs @@ -306,7 +306,7 @@ fn button( .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .font_weight(crate::ui::theme::MEDIUM) .cursor_pointer() diff --git a/apps/desktop-gpui/src/ui/input.rs b/apps/desktop-gpui/src/ui/input.rs index 618b63fb0d0..7a205f6a267 100644 --- a/apps/desktop-gpui/src/ui/input.rs +++ b/apps/desktop-gpui/src/ui/input.rs @@ -1268,9 +1268,13 @@ impl Render for TextInput { .when(self.fill, |view| view.h_full()) .overflow_hidden() .when(!self.inline, |view| { - view.px_2() + view.when_else(self.multiline, |view| view.px_2(), |view| view.px_3()) .py_1() - .rounded(radius::MD) + .rounded(if self.multiline { + radius::MD + } else { + radius::FULL + }) .border_1() .border_color(if self.focus.is_focused(window) { colors.ring diff --git a/apps/desktop-gpui/src/ui/theme.rs b/apps/desktop-gpui/src/ui/theme.rs index 4a4af34fa60..c2dd65b6ccd 100644 --- a/apps/desktop-gpui/src/ui/theme.rs +++ b/apps/desktop-gpui/src/ui/theme.rs @@ -10,15 +10,16 @@ pub mod radius { /// Tiny accents such as micro-indicators and compact stop glyphs. pub const XS: Pixels = px(2.); - /// Keycap hints, tiny badges/chips, checkboxes, inline code/tags, tiny icon hovers. + /// Keycap hints, checkboxes, inline code/tags, small thumbnails and square avatars. pub const SM: Pixels = px(4.); - /// Buttons, text inputs, menu items, sidebar list items, segmented control items. + /// Multiline textareas, multi-line list rows, compact cards and inner frames. pub const MD: Pixels = px(6.); - /// Segmented control tracks, chat composer, callouts/banners, code blocks, tables, cards, popovers/menus, floating bars. + /// Cards, popovers/menus, chat composer, callouts/banners, code blocks and tables. pub const LG: Pixels = px(8.); /// Toast notification cards, modals/dialogs/overlays, major floating panels. pub const XL: Pixels = px(12.); - /// Circular indicators, radio dots, pill badges, status dots, circular buttons, avatars. + /// Single-line interactive controls (buttons, icon buttons, inputs/search, selects, segmented + /// controls, chips/badges), single-line nav/menu rows, pills, indicators and circular avatars. pub const FULL: Pixels = px(9999.); /// Clamps a uniform radius to half the quad's shorter side for raw `Window::paint_quad` diff --git a/apps/desktop-gpui/src/workspace/automations/view.rs b/apps/desktop-gpui/src/workspace/automations/view.rs index 53ad873823c..b1148425349 100644 --- a/apps/desktop-gpui/src/workspace/automations/view.rs +++ b/apps/desktop-gpui/src/workspace/automations/view.rs @@ -1602,8 +1602,8 @@ impl AutomationsView { .a11y_language(add_step.locale) .h(px(32.)) .w_full() - .px(px(11.)) - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .justify_between() @@ -1912,7 +1912,7 @@ impl AutomationsView { .h(px(32.)) .w_full() .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .border_1() @@ -2240,7 +2240,7 @@ impl AutomationsView { .flex_1() .min_w_0() .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .border_1() @@ -2278,7 +2278,7 @@ impl AutomationsView { .id(ElementId::Name(format!("notion-{}", page.id).into())) .px_3() .py(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .line_height(px(16.)) .cursor_pointer() @@ -3187,8 +3187,8 @@ fn button( div() .id(id) .h(px(28.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex_shrink_0() .flex() .items_center() @@ -3204,7 +3204,7 @@ fn button( // Enabled buttons draw their smooth-corner border inside the padding; disabled // ones fall back to the CSS border. Variant::Outline => button - .when(enabled, |button| button.px(px(7.))) + .when(enabled, |button| button.px(px(11.))) .border_1() .border_color(colors.input) .bg(colors.background) @@ -3239,7 +3239,7 @@ fn button_ghost_icon(id: &str, colors: Theme) -> Stateful
{ .id(ElementId::Name(id.to_owned().into())) .ml_auto() .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex_shrink_0() .flex() .items_center() @@ -3297,8 +3297,8 @@ fn select_trigger( .a11y_pointer_press() .h(px(32.)) .w_full() - .px(px(11.)) - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .justify_between() @@ -3358,9 +3358,9 @@ fn select_menu(options: Vec, width: Option, colors: Theme) -> .relative() .w_full() .py(px(6.)) - .pl_2() - .pr_8() - .rounded(radius::MD) + .pl_3() + .pr(px(36.)) + .rounded(radius::FULL) .text_sm() .line_height(px(20.)) .whitespace_nowrap() @@ -3380,7 +3380,7 @@ fn select_menu(options: Vec, width: Option, colors: Theme) -> item.child( div() .absolute() - .right_2() + .right_3() .top_0() .bottom_0() .flex() diff --git a/apps/desktop-gpui/src/workspace/calendar.rs b/apps/desktop-gpui/src/workspace/calendar.rs index 4e448afea24..fdf96bda0a8 100644 --- a/apps/desktop-gpui/src/workspace/calendar.rs +++ b/apps/desktop-gpui/src/workspace/calendar.rs @@ -1059,8 +1059,8 @@ fn primary_button( .a11y_disabled(busy) .w_full() .min_h(px(32.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -1091,8 +1091,8 @@ fn secondary_button( .a11y_disabled(disabled) .w_full() .min_h(px(32.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -1208,9 +1208,9 @@ impl CalendarView { ) }); let chip = if item.all_day && !item.note { - chip.px(px(6.)) + chip.px_2() .py(px(2.)) - .rounded(radius::SM) + .rounded(radius::FULL) .truncate() .bg(color) .text_color(colors.primary_foreground) @@ -1386,8 +1386,8 @@ impl CalendarView { .id("calendar-join") .a11y_button("Join") .h(px(28.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .flex_shrink_0() .items_center() @@ -1467,8 +1467,8 @@ impl CalendarView { .a11y_language(folder_a11y_locale) .w_full() .min_h(px(32.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap_2() @@ -1933,7 +1933,7 @@ impl CalendarView { .a11y_button(refresh.text) .a11y_language(refresh.locale) .size(px(24.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -1950,7 +1950,7 @@ impl CalendarView { .h(px(28.)) .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .overflow_hidden() .border_1() .border_color(colors.border) @@ -1959,6 +1959,7 @@ impl CalendarView { segment("calendar-previous") .a11y_button("Previous") .w(px(28.)) + .rounded_l(radius::FULL) .child(icon( "workspace/ArrowLeft01Icon.svg", 14., @@ -1984,6 +1985,7 @@ impl CalendarView { segment("calendar-next") .a11y_button("Next") .w(px(28.)) + .rounded_r(radius::FULL) .child(icon( "workspace/ArrowRight01Icon.svg", 14., diff --git a/apps/desktop-gpui/src/workspace/calendar_sidebar.rs b/apps/desktop-gpui/src/workspace/calendar_sidebar.rs index 9b944bdace4..b49519220aa 100644 --- a/apps/desktop-gpui/src/workspace/calendar_sidebar.rs +++ b/apps/desktop-gpui/src/workspace/calendar_sidebar.rs @@ -345,7 +345,7 @@ pub fn context_menu( .a11y_disabled(item.disabled) .h(px(30.)) .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .text_sm() @@ -815,9 +815,9 @@ impl CalendarSidebar { .a11y_button(provider.name()) .when(!needs_permission, |row| row.aria_expanded(open)) .group(group.clone()) - .mx(px(-8.)) - .px_2() - .rounded(radius::MD) + .mx(px(-12.)) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap_1() @@ -1223,7 +1223,7 @@ impl CalendarSidebar { .a11y_button(refresh.text) .a11y_language(refresh.locale) .p_1() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .hover(move |style| style.bg(colors.accent)) .child( @@ -1288,7 +1288,7 @@ impl CalendarSidebar { .a11y_button(refresh.text) .a11y_disabled(loading) .p_1() - .rounded(radius::SM) + .rounded(radius::FULL) .flex_shrink_0() .when(loading, |button| button.opacity(0.5)) .when(!loading, |button| { @@ -1347,9 +1347,9 @@ impl CalendarSidebar { .when_some(account, |header, account| { let right_click = account.clone(); header - .mx(px(-8.)) - .px_2() - .rounded(radius::MD) + .mx(px(-12.)) + .px_3() + .rounded(radius::FULL) .hover(move |style| style.bg(colors.accent)) .on_mouse_down( MouseButton::Right, @@ -1619,7 +1619,7 @@ impl Render for CalendarSidebar { .a11y_language(go_home.locale) .group("calendar-back") .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() diff --git a/apps/desktop-gpui/src/workspace/changelog.rs b/apps/desktop-gpui/src/workspace/changelog.rs index 085f573eb91..63f56e11c76 100644 --- a/apps/desktop-gpui/src/workspace/changelog.rs +++ b/apps/desktop-gpui/src/workspace/changelog.rs @@ -763,7 +763,7 @@ impl Render for ChangelogView { .id("changelog-close") .ml_auto() .size_7() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() diff --git a/apps/desktop-gpui/src/workspace/contacts/list.rs b/apps/desktop-gpui/src/workspace/contacts/list.rs index 56a75db6939..7ff742c5e40 100644 --- a/apps/desktop-gpui/src/workspace/contacts/list.rs +++ b/apps/desktop-gpui/src/workspace/contacts/list.rs @@ -322,7 +322,7 @@ impl ContactsList { .group(SharedString::from(format!("pin-{id}"))) .flex_shrink_0() .p_1() - .rounded(radius::SM) + .rounded(radius::FULL) .when(!read_only, |pin| { pin.cursor_pointer() .on_mouse_down( @@ -602,7 +602,7 @@ impl ContactsList { .h(px(32.)) .w_full() .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .gap_2() @@ -668,7 +668,7 @@ impl ContactsList { .h(px(32.)) .w_full() .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .gap_2() @@ -741,7 +741,7 @@ impl ContactsList { .a11y_menu_item(label.clone()) .h(px(30.)) .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .cursor_pointer() diff --git a/apps/desktop-gpui/src/workspace/contacts/mod.rs b/apps/desktop-gpui/src/workspace/contacts/mod.rs index c4092f6e573..77756ce3aba 100644 --- a/apps/desktop-gpui/src/workspace/contacts/mod.rs +++ b/apps/desktop-gpui/src/workspace/contacts/mod.rs @@ -128,7 +128,7 @@ pub(super) fn menu_trigger( .id(id.clone()) .group(id.clone()) .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex_shrink_0() .flex() .items_center() @@ -200,8 +200,8 @@ pub(super) fn radio_item( .relative() .py(px(6.)) .pl(px(32.)) - .pr_2() - .rounded(radius::MD) + .pr_3() + .rounded(radius::FULL) .flex() .items_center() .text_color(colors.popover_foreground) @@ -746,8 +746,8 @@ impl Contacts { .a11y_language(resolved.locale) .group(id) .h(px(32.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap_2() diff --git a/apps/desktop-gpui/src/workspace/contacts/organization.rs b/apps/desktop-gpui/src/workspace/contacts/organization.rs index e68928732ae..13603dbe4f4 100644 --- a/apps/desktop-gpui/src/workspace/contacts/organization.rs +++ b/apps/desktop-gpui/src/workspace/contacts/organization.rs @@ -270,7 +270,7 @@ impl Contacts { .id(SharedString::from(format!("email-{}", human.id))) .a11y_link(format!("Email {}", human.name)) .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -294,7 +294,7 @@ impl Contacts { .id(SharedString::from(format!("linkedin-{}", human.id))) .a11y_link(format!("LinkedIn: {}", human.name)) .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() diff --git a/apps/desktop-gpui/src/workspace/contacts/person.rs b/apps/desktop-gpui/src/workspace/contacts/person.rs index 8aa70f82f46..8afc826246d 100644 --- a/apps/desktop-gpui/src/workspace/contacts/person.rs +++ b/apps/desktop-gpui/src/workspace/contacts/person.rs @@ -626,10 +626,10 @@ impl Contacts { .id("add-email") .a11y_button(add_email.text) .a11y_language(add_email.locale) - .ml(px(-8.)) + .ml(px(-12.)) .h(px(28.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .w_auto() @@ -694,10 +694,10 @@ impl Contacts { .map(|o| o.name.clone()) .unwrap_or_else(|| "Select company".into()), ) - .ml(px(-8.)) - .px_2() + .ml(px(-12.)) + .px_3() .py_1() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .cursor_pointer() @@ -906,9 +906,9 @@ impl Contacts { .child( div() .w_full() - .px_2() + .px_3() .py(px(4.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .gap_2() @@ -1033,8 +1033,8 @@ impl Contacts { text_xs(div()) .id(SharedString::from(format!("merge-{duplicate_id}"))) .h(px(28.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .font_weight(crate::ui::theme::MEDIUM) @@ -1233,8 +1233,8 @@ impl Contacts { .a11y_disabled(!enabled) .group("enrich-contact-button") .h(px(28.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap_2() @@ -1442,9 +1442,9 @@ impl Contacts { .id(SharedString::from(format!("related-{}", note.id))) .a11y_button(label.clone()) .w_full() - .px_2() + .px_3() .py_2() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .gap_3() @@ -1491,8 +1491,8 @@ impl Contacts { .h(px(32.)) .w(px(208.)) .max_w(gpui::relative(0.48)) - .px(px(10.)) - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap_2() diff --git a/apps/desktop-gpui/src/workspace/edit_review.rs b/apps/desktop-gpui/src/workspace/edit_review.rs index 347cb1b8d82..ddc12f4712f 100644 --- a/apps/desktop-gpui/src/workspace/edit_review.rs +++ b/apps/desktop-gpui/src/workspace/edit_review.rs @@ -48,13 +48,13 @@ pub fn button( div() .id(id.into()) .h_7() - .px_2() + .px_3() .flex() .flex_shrink_0() .items_center() .justify_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .line_height(px(16.)) .font_weight(MEDIUM) diff --git a/apps/desktop-gpui/src/workspace/folder_picker.rs b/apps/desktop-gpui/src/workspace/folder_picker.rs index e5d3b051464..d2b0beb62b5 100644 --- a/apps/desktop-gpui/src/workspace/folder_picker.rs +++ b/apps/desktop-gpui/src/workspace/folder_picker.rs @@ -333,9 +333,9 @@ impl FolderPicker { .flex() .items_center() .gap_2() - .px_2() + .px_3() .py(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .line_height(px(20.)) .text_color(colors.foreground) diff --git a/apps/desktop-gpui/src/workspace/folders_view.rs b/apps/desktop-gpui/src/workspace/folders_view.rs index 7ab40426fd6..33b35428f34 100644 --- a/apps/desktop-gpui/src/workspace/folders_view.rs +++ b/apps/desktop-gpui/src/workspace/folders_view.rs @@ -656,6 +656,7 @@ impl FoldersView { true, colors, ) + .rounded(radius::FULL) .aria_label(path.clone()) .when(selected, |row| row.font_weight(crate::ui::theme::MEDIUM)) .on_click(cx.listener({ @@ -727,7 +728,7 @@ impl FoldersView { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_click(cx.listener(|this, _, _, cx| this.open_picker(cx))) @@ -956,7 +957,7 @@ impl FoldersView { .flex() .items_center() .justify_center() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_click(cx.listener(move |this, _, _, cx| { @@ -986,7 +987,7 @@ impl FoldersView { .px_3() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(if input.focus_handle(cx).is_focused(window) { colors.ring diff --git a/apps/desktop-gpui/src/workspace/icon_picker.rs b/apps/desktop-gpui/src/workspace/icon_picker.rs index 570c493078e..1367fd273ae 100644 --- a/apps/desktop-gpui/src/workspace/icon_picker.rs +++ b/apps/desktop-gpui/src/workspace/icon_picker.rs @@ -187,7 +187,7 @@ impl IconPicker { div() .id("picker-clear") .p_1() - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_click(cx.listener(move |_, _, _, cx| { @@ -293,7 +293,7 @@ impl IconPicker { div() .id(SharedString::from(format!("icon-{key}"))) .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -385,7 +385,7 @@ impl IconPicker { div() .id(SharedString::from(format!("{label}-{id}"))) .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() diff --git a/apps/desktop-gpui/src/workspace/layout.rs b/apps/desktop-gpui/src/workspace/layout.rs index a43fbe2cd02..2f67a4496b8 100644 --- a/apps/desktop-gpui/src/workspace/layout.rs +++ b/apps/desktop-gpui/src/workspace/layout.rs @@ -50,7 +50,7 @@ impl WorkspaceView { .gap_8() .px_4() .py_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .line_height(px(20.)) .text_color(colors.foreground) diff --git a/apps/desktop-gpui/src/workspace/library.rs b/apps/desktop-gpui/src/workspace/library.rs index 75b31b637ca..d3f129700c5 100644 --- a/apps/desktop-gpui/src/workspace/library.rs +++ b/apps/desktop-gpui/src/workspace/library.rs @@ -996,7 +996,7 @@ impl LibraryView { .a11y_button(stop_listening.text) .a11y_language(stop_listening.locale) .size_5() - .rounded(radius::SM) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -1490,7 +1490,7 @@ impl Render for LibraryView { .id(index) .h(px(30.)) .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .text_sm() diff --git a/apps/desktop-gpui/src/workspace/open_note.rs b/apps/desktop-gpui/src/workspace/open_note.rs index 1af54ac5b30..3c1273a0421 100644 --- a/apps/desktop-gpui/src/workspace/open_note.rs +++ b/apps/desktop-gpui/src/workspace/open_note.rs @@ -2738,7 +2738,7 @@ impl NoteView { }) .aria_expanded(open) .h(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .flex_shrink_0() .items_center() @@ -2752,7 +2752,7 @@ impl NoteView { if folder.is_empty() || compact { view.w(px(28.)).justify_center() } else { - view.max_w(px(144.)).min_w_0().gap_1().px(px(6.)) + view.max_w(px(144.)).min_w_0().gap_1().px(px(10.)) } }) .on_hover(cx.listener(|this, hovering: &bool, _, _| { @@ -2874,7 +2874,7 @@ impl NoteView { .p(px(2.)) .gap(px(2.)) .items_center() - .rounded(radius::LG) + .rounded(radius::FULL) .bg(colors.foreground.opacity(0.1)) .children(tabs.iter().enumerate().map(|(index, tab)| { let active = tab == current; @@ -2993,8 +2993,8 @@ impl NoteView { view.aria_expanded(self.picker.is_some()) }) .h(px(24.)) - .px_2() - .rounded(radius::MD) + .px(px(10.)) + .rounded(radius::FULL) .flex() .flex_shrink_0() .items_center() @@ -3023,8 +3023,8 @@ impl NoteView { // A live transcript tab is red and wide enough for its dancing sticks. .when(active && recording, |view| { let dark = is_dark(colors); - view.w(px(98.)) - .min_w(px(98.)) + view.w(px(102.)) + .min_w(px(102.)) .bg(if dark { Hsla::from(rgb(0x450a0a)).opacity(0.5) } else { @@ -3169,7 +3169,7 @@ impl NoteView { Some( div().flex_shrink_0().px_1().pt_1().pb_2().child( div() - .rounded(radius::LG) + .rounded(radius::FULL) .overflow_hidden() .border_1() .border_color(colors.border.opacity(0.7)) @@ -3211,7 +3211,7 @@ impl NoteView { .a11y_language(share.locale) .aria_expanded(open) .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -3239,9 +3239,9 @@ impl NoteView { .id("record-note") .mx_1() .h(px(28.)) - .pl(px(6.)) - .pr(px(10.)) - .rounded(radius::MD) + .pl(px(8.)) + .pr(px(12.)) + .rounded(radius::FULL) .flex() .flex_shrink_0() .items_center() @@ -3379,11 +3379,14 @@ impl NoteView { .a11y_button("Comments") .aria_expanded(comments_open) .h(px(28.)) - .px(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() - .gap(px(4.)) + .when_else( + comment_count > 0, + |btn| btn.px(px(10.)).gap(px(4.)), + |btn| btn.w(px(28.)).justify_center(), + ) .text_xs() .text_color(tint) .when(comments_open, |btn| btn.bg(colors.accent)) @@ -3413,7 +3416,7 @@ impl NoteView { .a11y_language(more.locale) .aria_expanded(self.menu) .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -3542,9 +3545,9 @@ impl NoteView { .flex() .items_center() .gap_2() - .px_2() + .px_3() .py(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .text_sm() .line_height(px(20.)) .when(destructive, |view| view.text_color(red)) @@ -3692,7 +3695,7 @@ impl NoteView { .a11y_disabled(disabled) .h(px(30.)) .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .text_sm() diff --git a/apps/desktop-gpui/src/workspace/open_note/brief.rs b/apps/desktop-gpui/src/workspace/open_note/brief.rs index 448edeb4ca8..d776ae82cd8 100644 --- a/apps/desktop-gpui/src/workspace/open_note/brief.rs +++ b/apps/desktop-gpui/src/workspace/open_note/brief.rs @@ -1048,11 +1048,11 @@ impl NoteView { .a11y_button(label.text) .a11y_language(label.locale) .mb_6() - .ml(px(-8.)) + .ml(px(-12.)) .h_8() .max_w_full() - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap_2() diff --git a/apps/desktop-gpui/src/workspace/open_note/export_modal.rs b/apps/desktop-gpui/src/workspace/open_note/export_modal.rs index fbbca3ac3fd..e750bba5be1 100644 --- a/apps/desktop-gpui/src/workspace/open_note/export_modal.rs +++ b/apps/desktop-gpui/src/workspace/open_note/export_modal.rs @@ -812,7 +812,7 @@ impl Render for ExportModal { .a11y_disabled(disabled) .h(px(40.)) .w_full() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() diff --git a/apps/desktop-gpui/src/workspace/open_note/meeting_info.rs b/apps/desktop-gpui/src/workspace/open_note/meeting_info.rs index bf0c1df9e2d..7d80d70c8eb 100644 --- a/apps/desktop-gpui/src/workspace/open_note/meeting_info.rs +++ b/apps/desktop-gpui/src/workspace/open_note/meeting_info.rs @@ -837,8 +837,8 @@ impl MeetingInfo { .id("join-meeting") .a11y_link("Join") .h(px(28.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .flex_shrink_0() .items_center() diff --git a/apps/desktop-gpui/src/workspace/open_note/memo.rs b/apps/desktop-gpui/src/workspace/open_note/memo.rs index e8a533ad757..800b88a18c7 100644 --- a/apps/desktop-gpui/src/workspace/open_note/memo.rs +++ b/apps/desktop-gpui/src/workspace/open_note/memo.rs @@ -146,11 +146,11 @@ impl NoteView { div() .id(id) .a11y_button(title.clone()) - .ml(px(-8.)) + .ml(px(-12.)) .h_8() .max_w_full() - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap_2() @@ -176,7 +176,7 @@ impl NoteView { let untitled = crate::i18n::t_shared("Untitled", cx); (!templates.is_empty()).then(|| { // Full width, like shipping's fragment: a fit-content section would size itself to - // its rows' margin boxes, and each row's `max_w_full` would then cut 8px (its + // its rows' margin boxes, and each row's `max_w_full` would then cut 12px (its // negative margin) off the widest title. div() .id(label_msgid) diff --git a/apps/desktop-gpui/src/workspace/open_note/summary.rs b/apps/desktop-gpui/src/workspace/open_note/summary.rs index bad2b25c18e..66bf6abb97e 100644 --- a/apps/desktop-gpui/src/workspace/open_note/summary.rs +++ b/apps/desktop-gpui/src/workspace/open_note/summary.rs @@ -388,7 +388,7 @@ fn button( ) -> gpui::Stateful { div() .id(id) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .flex_shrink_0() .items_center() @@ -399,7 +399,7 @@ fn button( .a11y_button(label) .map(|button| { if small { - button.h_7().px_2().text_xs().line_height(px(16.)) + button.h_7().px_3().text_xs().line_height(px(16.)) } else { button.h_9().px_4().text_sm().line_height(px(20.)) } @@ -1164,8 +1164,8 @@ impl NoteView { .h_8() .flex_shrink_0() .w_full() - .px(px(10.)) - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap(px(6.)) @@ -1199,9 +1199,9 @@ impl NoteView { .flex() .items_center() .gap_1() - .px(px(6.)) + .px_2() .py(px(2.)) - .rounded(radius::SM) + .rounded(radius::FULL) .text_size(px(11.)) .line_height(px(16.5)) .font_weight(crate::ui::theme::MEDIUM) @@ -1258,8 +1258,8 @@ impl NoteView { .h_8() .flex_shrink_0() .w_full() - .px(px(10.)) - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap(px(6.)) @@ -1368,7 +1368,7 @@ impl NoteView { .a11y_button(clear_search.text) .a11y_language(clear_search.locale) .p(px(2.)) - .rounded(radius::SM) + .rounded(radius::FULL) .cursor_pointer() .hover(move |style| style.bg(colors.accent)) .on_click(cx.listener(|this, _, _, cx| { diff --git a/apps/desktop-gpui/src/workspace/open_note/versions.rs b/apps/desktop-gpui/src/workspace/open_note/versions.rs index e6f404d19b1..bf83770f82a 100644 --- a/apps/desktop-gpui/src/workspace/open_note/versions.rs +++ b/apps/desktop-gpui/src/workspace/open_note/versions.rs @@ -646,11 +646,15 @@ impl NoteView { .a11y_button(close_label.text) .a11y_language(close_label.locale) .absolute() - .top_4() - .right_4() - .rounded(radius::SM) + .top(px(10.)) + .right(px(10.)) + .size(px(28.)) + .flex() + .items_center() + .justify_center() + .rounded(radius::FULL) .opacity(0.7) - .hover(|style| style.opacity(1.)) + .hover(move |style| style.bg(colors.accent).opacity(1.)) .cursor_pointer() .on_click(cx.listener(|this, _, window, cx| this.close_history(window, cx))) .child(icon("editor/XIcon.svg", 16., colors.foreground)), @@ -692,8 +696,8 @@ fn button( div() .id(id) .h(px(28.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .flex_shrink_0() .items_center() diff --git a/apps/desktop-gpui/src/workspace/picker.rs b/apps/desktop-gpui/src/workspace/picker.rs index d7b89b25475..5141eaed8a7 100644 --- a/apps/desktop-gpui/src/workspace/picker.rs +++ b/apps/desktop-gpui/src/workspace/picker.rs @@ -551,7 +551,7 @@ impl NotePicker { .gap_3() .px_3() .py(px(10.)) - .rounded(radius::MD) + .rounded(radius::FULL) .text_size(px(14.)) .line_height(px(20.)) .text_color(muted) diff --git a/apps/desktop-gpui/src/workspace/resource_list.rs b/apps/desktop-gpui/src/workspace/resource_list.rs index e1ce121b0ab..4c489f24d0b 100644 --- a/apps/desktop-gpui/src/workspace/resource_list.rs +++ b/apps/desktop-gpui/src/workspace/resource_list.rs @@ -239,7 +239,7 @@ pub fn ghost_icon_button( .id(id.clone()) .group(id.clone()) .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex_shrink_0() .flex() .items_center() @@ -271,7 +271,7 @@ pub fn search_field( .items_center() .gap_2() .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .bg(if focused { @@ -288,7 +288,7 @@ pub fn search_field( .a11y_button(clear.text) .a11y_language(clear.locale) .size(px(16.)) - .rounded(radius::SM) + .rounded(radius::FULL) .flex_shrink_0() .cursor_pointer() .on_click(on_clear) @@ -400,8 +400,8 @@ pub fn menu_item( .a11y_menu_item(label) .a11y_disabled(disabled) .h(px(32.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .text_sm() @@ -437,7 +437,7 @@ pub fn context_item( .a11y_menu_item(label) .h(px(30.)) .px_3() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .text_sm() @@ -558,7 +558,7 @@ pub fn dialog_button( .id(id) .h(px(32.)) .px_4() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -596,8 +596,8 @@ pub fn share_button(id: &'static str, colors: Theme, cx: &gpui::App) -> Stateful .a11y_language(share.locale) .group(id) .h(px(28.)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex_shrink_0() .flex() .items_center() @@ -645,9 +645,9 @@ impl WarningToast { div() .id(id) .min_h(px(28.)) - .px(px(10.)) + .px_3() .py_1() - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() diff --git a/apps/desktop-gpui/src/workspace/sidebar.rs b/apps/desktop-gpui/src/workspace/sidebar.rs index b3b24b1f9f5..a4ee3d8b7f8 100644 --- a/apps/desktop-gpui/src/workspace/sidebar.rs +++ b/apps/desktop-gpui/src/workspace/sidebar.rs @@ -115,7 +115,7 @@ fn chrome_button( .group(id) .relative() .size(px(28.)) - .rounded(radius::MD) + .rounded(radius::FULL) .flex() .items_center() .justify_center() @@ -138,8 +138,8 @@ fn menu_item( div() .id(id) .h(px(MENU_ITEM_HEIGHT)) - .px_2() - .rounded(radius::MD) + .px_3() + .rounded(radius::FULL) .flex() .items_center() .gap_2() diff --git a/apps/desktop-gpui/src/workspace/task.rs b/apps/desktop-gpui/src/workspace/task.rs index 69d79a32113..9725f500fca 100644 --- a/apps/desktop-gpui/src/workspace/task.rs +++ b/apps/desktop-gpui/src/workspace/task.rs @@ -472,7 +472,7 @@ impl TaskView { .id(SharedString::from(format!("task-open-{index}"))) .flex_none() .p(px(6.)) - .rounded(radius::MD) + .rounded(radius::FULL) .cursor_pointer() .hover(move |style| style.bg(accent)) .on_click(move |_: &ClickEvent, _, cx| cx.open_url(&url)) diff --git a/apps/desktop-gpui/src/workspace/templates_view.rs b/apps/desktop-gpui/src/workspace/templates_view.rs index 9436722d820..a4ec1268063 100644 --- a/apps/desktop-gpui/src/workspace/templates_view.rs +++ b/apps/desktop-gpui/src/workspace/templates_view.rs @@ -1122,12 +1122,12 @@ impl TemplatesView { .a11y_language(resolved.locale) .group(id) .h(px(28.)) - .px_2() + .px_3() .flex_shrink_0() .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .text_xs() .line_height(px(16.)) .font_weight(crate::ui::theme::MEDIUM) @@ -1197,7 +1197,7 @@ impl TemplatesView { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_click( @@ -1259,7 +1259,7 @@ impl TemplatesView { .flex() .items_center() .justify_center() - .rounded(radius::MD) + .rounded(radius::FULL) .cursor_pointer() .hover(|style| style.bg(colors.accent)) .on_click(cx.listener(move |this, _, _, cx| { @@ -1634,7 +1634,7 @@ impl TemplatesView { .flex() .items_center() .gap_4() - .rounded(radius::LG) + .rounded(radius::FULL) .border_1() .border_color(colors.border) .bg(colors.card) @@ -1788,11 +1788,11 @@ impl TemplatesView { .a11y_button(create.text) .a11y_language(create.locale) .h(px(28.)) - .px_2() + .px_3() .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.background) @@ -1954,11 +1954,11 @@ impl TemplatesView { .id("improve-format") .flex_shrink_0() .h(px(28.)) - .px_2() + .px_3() .flex() .items_center() .gap_2() - .rounded(radius::MD) + .rounded(radius::FULL) .border_1() .border_color(colors.input) .bg(colors.background) @@ -2010,7 +2010,7 @@ impl TemplatesView { .px_4() .flex() .items_center() - .rounded(radius::MD) + .rounded(radius::FULL) .bg(colors.primary) .text_color(colors.primary_foreground) .text_sm() diff --git a/apps/mobile/src/components/folder-picker-sheet.tsx b/apps/mobile/src/components/folder-picker-sheet.tsx index b23686c187b..065daf91c87 100644 --- a/apps/mobile/src/components/folder-picker-sheet.tsx +++ b/apps/mobile/src/components/folder-picker-sheet.tsx @@ -15,7 +15,7 @@ import { import { normalizeFolderPath } from "@anlg/utils/folders"; import { IconButton } from "@/components/ui/icon-button"; -import { Radius, Spacing, Typography } from "@/constants/theme"; +import { CornerCurve, Radius, Spacing, Typography } from "@/constants/theme"; import { saveSessionFolder, useFolderPaths, @@ -202,15 +202,18 @@ const useStyles = createStyleHook((Colors) => ({ color: Colors.ink, backgroundColor: Colors.surface, borderRadius: Radius.control, - padding: Spacing.md, + borderCurve: CornerCurve.squircle, + paddingHorizontal: Spacing.md, + paddingVertical: Spacing.compact, }, row: { flexDirection: "row", alignItems: "center", gap: Spacing.md, minHeight: 52, - paddingHorizontal: Spacing.sm, + paddingHorizontal: Spacing.md, borderRadius: Radius.control, + borderCurve: CornerCurve.squircle, }, pressed: { backgroundColor: Colors.accentSurface }, label: { flex: 1, ...Typography.body, color: Colors.ink }, diff --git a/apps/mobile/src/constants/theme.ts b/apps/mobile/src/constants/theme.ts index 3b8c48e1b84..8395c8d6031 100644 --- a/apps/mobile/src/constants/theme.ts +++ b/apps/mobile/src/constants/theme.ts @@ -52,7 +52,7 @@ export const Spacing = { export const Radius = { card: DesignRadius.xl, - control: DesignRadius.lg, + control: DesignRadius.pill, panel: DesignRadius.panel, sheet: DesignRadius.sheet, pill: DesignRadius.pill, @@ -66,4 +66,4 @@ export const Typography = DesignTypography; export const ControlSize = DesignControl; export const LISTENING_CONTROL_HEIGHT = DesignControl.listening; -export const LISTENING_CONTROL_RADIUS = DesignRadius.panel; +export const LISTENING_CONTROL_RADIUS = DesignRadius.pill; diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.md index 4b792816bcb..cd352086cc7 100644 --- a/apps/web/AGENTS.md +++ b/apps/web/AGENTS.md @@ -62,7 +62,7 @@ Secondary / ghost uses surface + border: ### Shape and motion -Corners are square everywhere; a base rule in `src/styles.css` forces `border-radius: 0`, so don't add `rounded-*` classes. Transitions default to 70ms; use `duration-75` when a duration is needed, with no decorative easing or slow reveals. See `BRAND.md`. +Single-line interactive controls (buttons, icon buttons, single-line inputs, selects, segmented controls, chips/badges, and single-line menu/nav rows) use pill or circle shapes (`rounded-full` with `corner-shape: round` from `corners.css`), while containers (cards, popovers, dialogs, textareas, code blocks, and multi-line rows) stay rounded rectangles. Transitions default to 70ms; use `duration-75` when a duration is needed, with no decorative easing or slow reveals. See `BRAND.md`. ## Component structure diff --git a/apps/web/BRAND.md b/apps/web/BRAND.md index 8b0e681333e..cf491f16dc1 100644 --- a/apps/web/BRAND.md +++ b/apps/web/BRAND.md @@ -101,7 +101,7 @@ Six typefaces are loaded; the first three carry distinct roles. The rest are spe Shape and motion: -- Corners are square everywhere: buttons, inputs, cards, modals, tags and avatars. A base rule in `src/styles.css` forces `border-radius: 0`, so don't add `rounded-*` classes. +- Interactive controls and single-line rows (buttons, icon buttons, inputs, selects, segmented tabs, chips/badges, avatars, and single-line menu/nav rows) use pill or circle shapes (`rounded-full`, paired with `corner-shape: round` in `packages/ui/src/styles/corners.css`). Multi-line containers (cards, popovers, dialogs, textareas, code blocks, and callouts) stay rounded rectangles. - Motion is near-instant. Transitions default to 70ms; use `duration-75` when a duration is needed, and no decorative easing or slow reveals. Continuous illustration loops (marquees, audio bars, spinners) keep their timing. --- @@ -174,12 +174,12 @@ All patterns use 24px spacing (23px gap + 1px line) and reference border color t ### Primary CTA button -Warm stone gradient, square corners, scales on hover. Used in header, hero, and CTA sections. +Warm stone gradient, pill shape (`rounded-full`), scales on hover. Used in header, hero, and CTA sections. ```tsx diff --git a/packages/editor/src/widgets/format-toolbar.tsx b/packages/editor/src/widgets/format-toolbar.tsx index 2252b4483b2..1cca4f66d9a 100644 --- a/packages/editor/src/widgets/format-toolbar.tsx +++ b/packages/editor/src/widgets/format-toolbar.tsx @@ -224,7 +224,7 @@ export function FormatToolbar({ role="toolbar" aria-label="Format selection" className={cn([ - "bg-popover ring-border fixed z-50 flex items-center gap-0.5 rounded-xl p-1 ring-1", + "bg-popover ring-border fixed z-50 flex items-center gap-0.5 rounded-full p-1 ring-1", "shadow-lg", ])} style={{ top: 0, left: 0 }} @@ -238,7 +238,7 @@ export function FormatToolbar({ key={button.id} aria-pressed={active} className={cn([ - "flex size-7 items-center justify-center rounded-md", + "flex size-7 items-center justify-center rounded-full", "cursor-pointer border-none transition-colors", active ? "bg-primary text-primary-foreground" @@ -258,7 +258,7 @@ export function FormatToolbar({ type="button" aria-label="Comment" className={cn([ - "text-muted-foreground flex size-7 items-center justify-center rounded-md", + "text-muted-foreground flex size-7 items-center justify-center rounded-full", "hover:bg-accent hover:text-accent-foreground cursor-pointer border-none bg-transparent transition-colors", ])} onClick={onComment} diff --git a/packages/editor/src/widgets/slash-command.tsx b/packages/editor/src/widgets/slash-command.tsx index bd6184a774d..0b470c281ba 100644 --- a/packages/editor/src/widgets/slash-command.tsx +++ b/packages/editor/src/widgets/slash-command.tsx @@ -371,7 +371,7 @@ export function SlashCommandMenu() {