Change summary
crates/search/src/mode.rs | 9 +++++----
crates/search/src/search_bar.rs | 7 +++----
2 files changed, 8 insertions(+), 8 deletions(-)
Detailed changes
@@ -51,15 +51,16 @@ impl SearchMode {
pub(crate) fn border_right(&self) -> bool {
match self {
- SearchMode::Text => false,
- _ => true,
+ SearchMode::Regex => true,
+ SearchMode::Text => true,
+ SearchMode::Semantic => true,
}
}
pub(crate) fn border_left(&self) -> bool {
match self {
- SearchMode::Regex => false,
- _ => true,
+ SearchMode::Text => true,
+ _ => false,
}
}
@@ -125,10 +125,9 @@ pub(crate) fn render_search_mode_button<V: View>(
.in_state(is_active)
.style_for(state)
.clone();
- if mode.button_side().is_some() {
- style.container.border.left = mode.border_left();
- style.container.border.right = mode.border_right();
- }
+ style.container.border.left = mode.border_left();
+ style.container.border.right = mode.border_right();
+
let label = Label::new(mode.label(), style.text.clone()).contained();
let mut container_style = style.container.clone();
if let Some(button_side) = mode.button_side() {