Add row_height

This commit is contained in:
Piotr Osiewicz 2023-08-11 17:02:25 +02:00
parent 100a8961b5
commit 799278e296
4 changed files with 7 additions and 3 deletions

View File

@ -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()

View File

@ -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()
}

View File

@ -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)]

View File

@ -272,6 +272,7 @@ export default function search(): any {
},
},
}),
search_bar_row_height: 32,
}
}