reworked style tree to use colorScheme instead of old theme. Very limited style for now

This commit is contained in:
K Simmons 2022-09-21 12:39:59 -07:00
parent 0c4c5f9238
commit 56f9543a95
53 changed files with 1017 additions and 1734 deletions

View file

@ -1,36 +1,37 @@
import Theme from "../themes/common/theme";
import { ColorScheme } from "../themes/common/colorScheme";
import { panel } from "./app";
import { backgroundColor, iconColor, player, text } from "./components";
import { background, foreground, text } from "./components";
export default function projectPanel(theme: Theme) {
export default function projectPanel(colorScheme: ColorScheme) {
let layer = colorScheme.lowest.middle;
return {
...panel,
padding: { left: 12, right: 12, top: 6, bottom: 6 },
indentWidth: 8,
entry: {
height: 24,
iconColor: iconColor(theme, "muted"),
iconColor: foreground(layer, "on"),
iconSize: 8,
iconSpacing: 8,
text: text(theme, "mono", "secondary", { size: "sm" }),
text: text(layer, "mono", "on", { size: "sm" }),
hover: {
background: backgroundColor(theme, 300, "hovered"),
background: background(layer, "on", "hovered"),
},
active: {
background: backgroundColor(theme, 300, "active"),
text: text(theme, "mono", "active", { size: "sm" }),
background: background(layer, "base", "active"),
text: text(layer, "mono", "base", "active", { size: "sm" }),
},
activeHover: {
background: backgroundColor(theme, 300, "active"),
text: text(theme, "mono", "active", { size: "sm" }),
background: background(layer, "base", "hovered"),
text: text(layer, "mono", "base", "active", { size: "sm" }),
},
},
cutEntryFade: 0.4,
ignoredEntryFade: 0.6,
filenameEditor: {
background: backgroundColor(theme, "on300"),
text: text(theme, "mono", "active", { size: "sm" }),
selection: player(theme, 1).selection,
background: background(layer, "on"),
text: text(layer, "mono", "on", "active", { size: "sm" }),
selection: colorScheme.players[0],
},
};
}