diff --git a/crates/search/src/search_bar.rs b/crates/search/src/search_bar.rs index 9993fa530a..7b2ec33187 100644 --- a/crates/search/src/search_bar.rs +++ b/crates/search/src/search_bar.rs @@ -65,6 +65,7 @@ pub(super) fn render_nav_button( MouseEventHandler::::new(direction as usize, cx, |state, cx| { let theme = theme::current(cx); let mut style = theme.search.nav_button.style_for(state).clone(); + let button_side_width = style.container.corner_radius; style.container.corner_radius = 0.; let label = Label::new(icon, style.label.clone()) .contained() @@ -82,7 +83,7 @@ pub(super) fn render_nav_button( .with_border(style.container.border.width, style.container.border.color) .contained() .constrained() - .with_max_width(theme.search.mode_filling_width), + .with_max_width(button_side_width), ) .with_child(label) .constrained() @@ -100,7 +101,7 @@ pub(super) fn render_nav_button( .with_border(style.container.border.width, style.container.border.color) .contained() .constrained() - .with_max_width(theme.search.mode_filling_width), + .with_max_width(button_side_width), ) .constrained() .with_height(theme.workspace.toolbar.height), @@ -134,7 +135,8 @@ pub(crate) fn render_search_mode_button( .in_state(is_active) .style_for(state) .clone(); - + let side_width = style.container.corner_radius; + style.container.corner_radius = 0.; let label = Label::new(mode.label(), style.text.clone()) .contained() .with_style(style.container); @@ -156,7 +158,7 @@ pub(crate) fn render_search_mode_button( .with_border(style.container.border.width, style.container.border.color) .contained() .constrained() - .with_max_width(theme.search.mode_filling_width), + .with_max_width(side_width), ) .with_child(label) .into_any() @@ -174,7 +176,7 @@ pub(crate) fn render_search_mode_button( .with_border(style.container.border.width, style.container.border.color) .contained() .constrained() - .with_max_width(theme.search.mode_filling_width), + .with_max_width(side_width), ) .into_any() } diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 1107906ca7..e950845b49 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -388,7 +388,6 @@ pub struct Search { pub dismiss_button: Interactive, pub editor_icon: IconStyle, pub mode_button: Toggleable>, - pub mode_filling_width: f32, pub nav_button: Interactive, } diff --git a/styles/src/style_tree/search.ts b/styles/src/style_tree/search.ts index 35e7042ceb..8da7e21eb6 100644 --- a/styles/src/style_tree/search.ts +++ b/styles/src/style_tree/search.ts @@ -201,7 +201,7 @@ export default function search(): any { right: 10, top: 6, }, - corner_radius: 2, + corner_radius: 6, }, state: { hovered: { @@ -230,12 +230,11 @@ export default function search(): any { }, }, }), - mode_filling_width: 4.0, nav_button: interactive({ base: { text: text(theme.highest, "mono", "on"), background: background(theme.highest, "on"), - corner_radius: 2, + corner_radius: 6, border: { ...border(theme.highest, "on"), left: false,