gpui: Rename `rounded_sm` to `rounded_xs` (#26221)

Marshall Bowers created

This PR renames the `rounded_sm` style method to `rounded_xs`.

This will allow us to add an additional step in the scale.

Release Notes:

- N/A

Change summary

crates/editor/src/code_context_menus.rs              | 2 +-
crates/editor/src/editor.rs                          | 2 +-
crates/editor/src/element.rs                         | 4 ++--
crates/gpui/examples/image_loading.rs                | 4 ++--
crates/gpui/src/window/prompts.rs                    | 2 +-
crates/gpui_macros/src/styles.rs                     | 2 +-
crates/markdown_preview/src/markdown_preview_view.rs | 2 +-
crates/repl/src/notebook/cell.rs                     | 8 ++++----
crates/ui/src/components/keybinding.rs               | 2 +-
crates/ui/src/components/numeric_stepper.rs          | 2 +-
crates/ui/src/components/toggle.rs                   | 2 +-
crates/zed/src/zed/migrate.rs                        | 2 +-
12 files changed, 17 insertions(+), 17 deletions(-)

Detailed changes

crates/editor/src/code_context_menus.rs 🔗

@@ -534,7 +534,7 @@ impl CompletionsMenu {
                         };
                         let color_swatch = completion
                             .color()
-                            .map(|color| div().size_4().bg(color).rounded_sm());
+                            .map(|color| div().size_4().bg(color).rounded_xs());
 
                         div().min_w(px(280.)).max_w(px(540.)).child(
                             ListItem::new(mat.candidate_id)

crates/editor/src/editor.rs 🔗

@@ -1201,7 +1201,7 @@ impl Editor {
                     .bg(cx.theme().colors().ghost_element_background)
                     .hover(|style| style.bg(cx.theme().colors().ghost_element_hover))
                     .active(|style| style.bg(cx.theme().colors().ghost_element_active))
-                    .rounded_sm()
+                    .rounded_xs()
                     .size_full()
                     .cursor_pointer()
                     .child("⋯")

crates/editor/src/element.rs 🔗

@@ -1724,7 +1724,7 @@ impl EditorElement {
                 .h(line_height)
                 .w_full()
                 .px_1()
-                .rounded_sm()
+                .rounded_xs()
                 .opacity(opacity)
                 .bg(severity_to_color(&diagnostic_to_render.severity)
                     .color(cx)
@@ -2741,7 +2741,7 @@ impl EditorElement {
                         header.child(
                             div()
                                 .hover(|style| style.bg(colors.element_selected))
-                                .rounded_sm()
+                                .rounded_xs()
                                 .child(
                                     ButtonLike::new("toggle-buffer-fold")
                                         .style(ui::ButtonStyle::Transparent)

crates/gpui/examples/image_loading.rs 🔗

@@ -69,7 +69,7 @@ struct ImageLoadingExample {}
 
 impl ImageLoadingExample {
     fn loading_element() -> impl IntoElement {
-        div().size_full().flex_none().p_0p5().rounded_sm().child(
+        div().size_full().flex_none().p_0p5().rounded_xs().child(
             div().size_full().with_animation(
                 "loading-bg",
                 Animation::new(Duration::from_secs(3))
@@ -89,7 +89,7 @@ impl ImageLoadingExample {
                 .flex()
                 .items_center()
                 .justify_center()
-                .rounded_sm()
+                .rounded_xs()
                 .text_sm()
                 .text_color(fallback_color)
                 .border_1()

crates/gpui/src/window/prompts.rs 🔗

@@ -135,7 +135,7 @@ impl Render for FallbackPromptRenderer {
                     .border_1()
                     .border_color(opaque_grey(0.2, 0.5))
                     .mt_1()
-                    .rounded_sm()
+                    .rounded_xs()
                     .cursor_pointer()
                     .text_sm()
                     .child(action.clone())

crates/gpui_macros/src/styles.rs 🔗

@@ -1233,7 +1233,7 @@ fn corner_suffixes() -> Vec<CornerStyleSuffix> {
             doc_string_suffix: "0px",
         },
         CornerStyleSuffix {
-            suffix: "sm",
+            suffix: "xs",
             radius_tokens: quote! { rems(0.125) },
             doc_string_suffix: "2px (0.125rem)",
         },

crates/repl/src/notebook/cell.rs 🔗

@@ -397,7 +397,7 @@ impl Render for MarkdownCell {
                 h_flex()
                     .w_full()
                     .pr_6()
-                    .rounded_sm()
+                    .rounded_xs()
                     .items_start()
                     .gap(DynamicSpacing::Base08.rems(cx))
                     .bg(self.selected_bg_color(window, cx))
@@ -572,7 +572,7 @@ impl Render for CodeCell {
                 h_flex()
                     .w_full()
                     .pr_6()
-                    .rounded_sm()
+                    .rounded_xs()
                     .items_start()
                     .gap(DynamicSpacing::Base08.rems(cx))
                     .bg(self.selected_bg_color(window, cx))
@@ -598,7 +598,7 @@ impl Render for CodeCell {
                 h_flex()
                     .w_full()
                     .pr_6()
-                    .rounded_sm()
+                    .rounded_xs()
                     .items_start()
                     .gap(DynamicSpacing::Base08.rems(cx))
                     .bg(self.selected_bg_color(window, cx))
@@ -718,7 +718,7 @@ impl Render for RawCell {
                 h_flex()
                     .w_full()
                     .pr_2()
-                    .rounded_sm()
+                    .rounded_xs()
                     .items_start()
                     .gap(DynamicSpacing::Base08.rems(cx))
                     .bg(self.selected_bg_color(window, cx))

crates/ui/src/components/keybinding.rs 🔗

@@ -120,7 +120,7 @@ impl RenderOnce for KeyBinding {
                 h_flex()
                     .flex_none()
                     .py_0p5()
-                    .rounded_sm()
+                    .rounded_xs()
                     .text_color(cx.theme().colors().text_muted)
                     .when(use_text, |el| {
                         el.child(

crates/ui/src/components/numeric_stepper.rs 🔗

@@ -75,7 +75,7 @@ impl RenderOnce for NumericStepper {
                 h_flex()
                     .gap_1()
                     .px_1()
-                    .rounded_sm()
+                    .rounded_xs()
                     .bg(cx.theme().colors().editor_background)
                     .child(
                         IconButton::new("decrement", IconName::Dash)

crates/ui/src/components/toggle.rs 🔗

@@ -197,7 +197,7 @@ impl RenderOnce for Checkbox {
                     .items_center()
                     .m(DynamicSpacing::Base04.px(cx))
                     .size(DynamicSpacing::Base16.rems(cx))
-                    .rounded_sm()
+                    .rounded_xs()
                     .bg(bg_color)
                     .border_1()
                     .border_color(border_color)

crates/zed/src/zed/migrate.rs 🔗

@@ -199,7 +199,7 @@ impl Render for MigrationBanner {
                                 div()
                                     .px_1()
                                     .bg(cx.theme().colors().background)
-                                    .rounded_sm()
+                                    .rounded_xs()
                                     .child(
                                         Label::new(backup_file_name)
                                             .buffer_font(cx)