Change summary
crates/search/src/project_search.rs | 4 +++-
crates/search/src/search_bar.rs | 4 ++--
crates/theme/src/theme.rs | 1 +
styles/src/style_tree/search.ts | 1 +
4 files changed, 7 insertions(+), 3 deletions(-)
Detailed changes
@@ -1592,7 +1592,8 @@ impl View for ProjectSearchBar {
.top()
.left(),
)
- .contained()
+ .constrained()
+ .with_max_height(theme.search.search_bar_row_height)
.flex(1., true),
)
.with_child(
@@ -1609,6 +1610,7 @@ impl View for ProjectSearchBar {
.constrained()
.with_min_width(theme.search.editor.min_width)
.with_max_width(theme.search.editor.max_width)
+ .with_max_height(theme.search.search_bar_row_height)
.flex(1., false),
)
.contained()
@@ -163,7 +163,7 @@ pub(crate) fn render_search_mode_button<V: View>(
.contained()
.constrained()
.with_max_width(side_width)
- .with_height(32.),
+ .with_height(theme.search.search_bar_row_height),
)
.with_child(label)
.into_any()
@@ -183,7 +183,7 @@ pub(crate) fn render_search_mode_button<V: View>(
.contained()
.constrained()
.with_max_width(side_width)
- .with_height(32.),
+ .with_height(theme.search.search_bar_row_height),
)
.into_any()
}
@@ -389,6 +389,7 @@ pub struct Search {
pub editor_icon: IconStyle,
pub mode_button: Toggleable<Interactive<ContainedText>>,
pub nav_button: Interactive<ContainedLabel>,
+ pub search_bar_row_height: f32,
}
#[derive(Clone, Deserialize, Default, JsonSchema)]
@@ -272,6 +272,7 @@ export default function search(): any {
},
},
}),
+ search_bar_row_height: 32,
}
}