Remove 2 suffix for language selector, project panel, recent_projects, copilot_button, breadcrumbs, activity_indicator
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
252694390a
commit
292b3397ab
37 changed files with 1297 additions and 6979 deletions
|
@ -1,13 +1,11 @@
|
|||
use std::path::Path;
|
||||
|
||||
use fuzzy::StringMatch;
|
||||
use gpui::{
|
||||
elements::{Label, LabelStyle},
|
||||
AnyElement, Element,
|
||||
};
|
||||
use ui::{prelude::*, HighlightedLabel};
|
||||
use util::paths::PathExt;
|
||||
use workspace::WorkspaceLocation;
|
||||
|
||||
#[derive(IntoElement)]
|
||||
pub struct HighlightedText {
|
||||
pub text: String,
|
||||
pub highlight_positions: Vec<usize>,
|
||||
|
@ -42,11 +40,11 @@ impl HighlightedText {
|
|||
char_count,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn render<V: 'static>(self, style: impl Into<LabelStyle>) -> AnyElement<V> {
|
||||
Label::new(self.text, style)
|
||||
.with_highlights(self.highlight_positions)
|
||||
.into_any()
|
||||
impl RenderOnce for HighlightedText {
|
||||
fn render(self, _cx: &mut WindowContext) -> impl IntoElement {
|
||||
HighlightedLabel::new(self.text, self.highlight_positions)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue