Assign a background to find buttons
This commit is contained in:
@@ -114,12 +114,12 @@ impl View for FindBar {
|
||||
.with_children(self.active_editor.as_ref().and_then(|editor| {
|
||||
let (_, highlighted_ranges) =
|
||||
editor.read(cx).highlighted_ranges_for_type::<Self>()?;
|
||||
let match_ix = cmp::min(self.active_match_index? + 1, highlighted_ranges.len());
|
||||
let message = if highlighted_ranges.is_empty() {
|
||||
"No matches".to_string()
|
||||
let message = if let Some(match_ix) = self.active_match_index {
|
||||
format!("{}/{}", match_ix + 1, highlighted_ranges.len())
|
||||
} else {
|
||||
format!("{}/{}", match_ix, highlighted_ranges.len())
|
||||
"No matches".to_string()
|
||||
};
|
||||
|
||||
Some(
|
||||
Label::new(message, theme.find.match_index.text.clone())
|
||||
.contained()
|
||||
|
||||
@@ -330,6 +330,7 @@ background = "$surface.1"
|
||||
extends = "$text.1"
|
||||
padding = { left = 6, right = 6, top = 1, bottom = 1 }
|
||||
corner_radius = 6
|
||||
background = "$surface.1"
|
||||
border = { width = 1, color = "$border.0" }
|
||||
margin.left = 1
|
||||
margin.right = 1
|
||||
|
||||
Reference in New Issue
Block a user