Wire project panel themes into rust

This commit is contained in:
Mikayla Maki
2023-05-22 09:55:59 -07:00
parent b80cb73745
commit 2200a22c07
4 changed files with 47 additions and 76 deletions
+13 -10
View File
@@ -13,6 +13,17 @@ export default function projectPanel(colorScheme: ColorScheme) {
iconSpacing: 8,
}
let status = {
git: {
modified: isLight
? colorScheme.ramps.yellow(0.6).hex()
: colorScheme.ramps.yellow(0.5).hex(),
inserted: isLight
? colorScheme.ramps.green(0.4).hex()
: colorScheme.ramps.green(0.5).hex(),
}
}
let entry = {
...baseEntry,
text: text(layer, "mono", "variant", { size: "sm" }),
@@ -29,16 +40,7 @@ export default function projectPanel(colorScheme: ColorScheme) {
background: background(layer, "active"),
text: text(layer, "mono", "active", { size: "sm" }),
},
status: {
git: {
modified: isLight
? colorScheme.ramps.yellow(0.6).hex()
: colorScheme.ramps.yellow(0.5).hex(),
inserted: isLight
? colorScheme.ramps.green(0.4).hex()
: colorScheme.ramps.green(0.5).hex(),
}
}
status
}
return {
@@ -70,6 +72,7 @@ export default function projectPanel(colorScheme: ColorScheme) {
entry,
draggedEntry: {
...baseEntry,
status,
text: text(layer, "mono", "on", { size: "sm" }),
background: withOpacity(background(layer, "on"), 0.9),
border: border(layer),