File finder UI enhancement (#7364)
File finder looks and feels a little bulky now. It duplicates file names and consumes too much space for each file. This PR makes it more compact: - File name is trimmed from the path, removing duplication - Path is placed to the right of the file name, improving space usage - Path is muted and printed in small size to not distract attention from the main information (file names) It makes search results easier to look through, consistent with the editor tabs, and closer in terms of usage to mature editors. Release Notes: - File finder UI enhancement
This commit is contained in:
parent
91303a5021
commit
2ed45d72d8
4 changed files with 22 additions and 7 deletions
|
@ -79,6 +79,8 @@ impl RenderOnce for HighlightedLabel {
|
|||
let mut text_style = cx.text_style().clone();
|
||||
text_style.color = self.base.color.color(cx);
|
||||
|
||||
LabelLike::new().child(StyledText::new(self.label).with_highlights(&text_style, highlights))
|
||||
LabelLike::new()
|
||||
.size(self.base.size)
|
||||
.child(StyledText::new(self.label).with_highlights(&text_style, highlights))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ pub trait LabelCommon {
|
|||
|
||||
#[derive(IntoElement)]
|
||||
pub struct LabelLike {
|
||||
size: LabelSize,
|
||||
pub(crate) size: LabelSize,
|
||||
line_height_style: LineHeightStyle,
|
||||
pub(crate) color: Color,
|
||||
strikethrough: bool,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue