diff --git a/crates/db/test-db.db b/crates/db/test-db.db new file mode 100644 index 0000000000000000000000000000000000000000..26ea1d32a3b79e8d605aa580ce7597025fc8d7ca Binary files /dev/null and b/crates/db/test-db.db differ diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index b5d1d0caa369cacf555f1e40f0200645d2879e97..5f1e07aa2166b5b9bf5e412996eba406220cb946 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -1015,15 +1015,19 @@ impl ProjectPanel { let show_editor = details.is_editing && !details.is_processing; MouseEventHandler::::new(entry_id.to_usize(), cx, |state, cx| { 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(); - if details.is_ignored { - style.text.color.fade_out(theme.ignored_entry_fade); - style.icon_color.fade_out(theme.ignored_entry_fade); - } - if details.is_cut { - style.text.color.fade_out(theme.cut_entry_fade); - style.icon_color.fade_out(theme.cut_entry_fade); - } + + let entry_style = if details.is_ignored && details.is_cut { + &theme.ignored_and_cut_entry + } else if details.is_ignored { + &theme.ignored_entry + } else if details.is_cut { + &theme.cut_entry + } else { + &theme.entry + }; + + let style = entry_style.style_for(state, details.is_selected).clone(); + let row_container_style = if show_editor { theme.filename_editor.container } else { diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 9cd378cb527f03aa09826c68d5c2c0a42f9670da..c1757cb0223da307a849cf14666f7bde65cfe95d 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -326,8 +326,9 @@ pub struct ProjectPanel { #[serde(flatten)] pub container: ContainerStyle, pub entry: Interactive, - pub cut_entry_fade: f32, - pub ignored_entry_fade: f32, + pub ignored_entry: Interactive, + pub cut_entry: Interactive, + pub ignored_and_cut_entry: Interactive, pub filename_editor: FieldEditor, pub indent_width: f32, } diff --git a/styles/src/styleTree/components.ts b/styles/src/styleTree/components.ts index 7776c4f14fe272cdc6c0d2ea571be93572194f2c..3244e7e4eab418aa9e365076437da56123dc6aa4 100644 --- a/styles/src/styleTree/components.ts +++ b/styles/src/styleTree/components.ts @@ -89,6 +89,7 @@ interface TextProperties { size?: keyof typeof fontSizes; weight?: FontWeight; underline?: boolean; + color?: string; } export function text( @@ -132,11 +133,12 @@ export function text( } let size = fontSizes[properties?.size || "sm"]; + let color = properties?.color || style.foreground; return { family: fontFamilies[fontFamily], - color: style.foreground, ...properties, + color, size, }; } diff --git a/styles/src/styleTree/projectPanel.ts b/styles/src/styleTree/projectPanel.ts index 9b906c893f8321c223664ed0087cf9c20957fd5b..49c7f048c4c8a67b9ad5782ee7a1b8d48734284c 100644 --- a/styles/src/styleTree/projectPanel.ts +++ b/styles/src/styleTree/projectPanel.ts @@ -3,30 +3,43 @@ import { background, foreground, text } from "./components"; export default function projectPanel(colorScheme: ColorScheme) { let layer = colorScheme.middle; + + let entry = { + height: 24, + iconColor: foreground(layer, "variant"), + iconSize: 8, + iconSpacing: 8, + text: text(layer, "mono", "variant", { size: "sm" }), + hover: { + background: background(layer, "variant", "hovered"), + }, + active: { + background: background(layer, "active"), + text: text(layer, "mono", "active", { size: "sm" }), + }, + activeHover: { + background: background(layer, "active"), + text: text(layer, "mono", "active", { size: "sm" }), + }, + }; + return { background: background(layer), padding: { left: 12, right: 12, top: 6, bottom: 6 }, indentWidth: 8, - entry: { - height: 24, - iconColor: foreground(layer, "variant"), - iconSize: 8, - iconSpacing: 8, - text: text(layer, "mono", "variant", { size: "sm" }), - hover: { - background: background(layer, "variant", "hovered"), - }, - active: { - background: background(layer, "active"), - text: text(layer, "mono", "active", { size: "sm" }), - }, - activeHover: { - background: background(layer, "active"), - text: text(layer, "mono", "active", { size: "sm" }), - }, + entry, + ignoredEntry: { + ...entry, + text: text(layer, "mono", "variant", { color: "#ff00cc" }), + }, + cutEntry: { + ...entry, + text: text(layer, "mono", "variant", { color: "#ff00cc" }), + }, + ignoredAndCutEntry: { + ...entry, + text: text(layer, "mono", "variant", { color: "#ffb700" }), }, - cutEntryFade: 0.4, - ignoredEntryFade: 0.6, filenameEditor: { background: background(layer, "on"), text: text(layer, "mono", "on", { size: "sm" }),