Change summary
crates/project_panel/src/project_panel.rs | 5 ++---
crates/theme/src/theme.rs | 1 +
styles/src/styleTree/projectPanel.ts | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
Detailed changes
@@ -787,10 +787,9 @@ impl ProjectPanel {
MouseEventHandler::new::<Self, _, _>(entry_id.to_usize(), cx, |state, _| {
let padding = theme.container.padding.left + details.depth as f32 * theme.indent_width;
let mut style = theme.entry.style_for(state, details.is_selected).clone();
- // TODO: get style from theme.
if details.is_ignored {
- style.text.color.fade_out(0.6);
- style.icon_color.fade_out(0.6);
+ style.text.color.fade_out(theme.ignored_entry_fade);
+ style.icon_color.fade_out(theme.ignored_entry_fade);
}
let row_container_style = if show_editor {
theme.filename_editor.container
@@ -223,6 +223,7 @@ pub struct ProjectPanel {
#[serde(flatten)]
pub container: ContainerStyle,
pub entry: Interactive<ProjectPanelEntry>,
+ pub ignored_entry_fade: f32,
pub filename_editor: FieldEditor,
pub indent_width: f32,
}
@@ -26,6 +26,7 @@ export default function projectPanel(theme: Theme) {
text: text(theme, "mono", "active", { size: "sm" }),
}
},
+ ignoredEntryFade: 0.6,
filenameEditor: {
background: backgroundColor(theme, 500, "active"),
text: text(theme, "mono", "primary", { size: "sm" }),