projectPanel.ts

 1import { ColorScheme } from "../themes/common/colorScheme";
 2import { withOpacity } from "../utils/color";
 3import { background, border, foreground, text } from "./components";
 4
 5export default function projectPanel(colorScheme: ColorScheme) {
 6  let layer = colorScheme.middle;
 7  
 8  let baseEntry = {
 9    height: 24,
10    iconColor: foreground(layer, "variant"),
11    iconSize: 8,
12    iconSpacing: 8,
13  }
14
15  let entry = {
16    ...baseEntry,
17    text: text(layer, "mono", "variant", { size: "sm" }),
18    hover: {
19      background: background(layer, "variant", "hovered"),
20    },
21    active: {
22      background: background(layer, "active"),
23      text: text(layer, "mono", "active", { size: "sm" }),
24    },
25    activeHover: {
26      background: background(layer, "active"),
27      text: text(layer, "mono", "active", { size: "sm" }),
28    },
29  };
30
31  return {
32    background: background(layer),
33    padding: { left: 12, right: 12, top: 6, bottom: 6 },
34    indentWidth: 8,
35    entry,
36    draggedEntry: {
37      ...baseEntry,
38      text: text(layer, "mono", "on", { size: "sm" }),
39      background: withOpacity(background(layer, "on"), 0.9),
40      border: border(layer),
41    },
42    ignoredEntry: {
43      ...entry,
44      text: text(layer, "mono", "disabled"),
45    },
46    cutEntry: {
47      ...entry,
48      text: text(layer, "mono", "disabled"),
49      active: {
50        background: background(layer, "active"),
51        text: text(layer, "mono", "disabled", { size: "sm" }),
52      },
53    },
54    filenameEditor: {
55      background: background(layer, "on"),
56      text: text(layer, "mono", "on", { size: "sm" }),
57      selection: colorScheme.players[0],
58    },
59  };
60}