Make fade of ignored entries styleable
This commit is contained in:
parent
85f228dade
commit
138a0b042d
3 changed files with 4 additions and 3 deletions
|
@ -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" }),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue