fix: allow all accents to be used (#232)
This commit is contained in:
28
build.py
28
build.py
@@ -231,38 +231,13 @@ def gnome_shell_version():
|
||||
f"@import 'extensions-{GS_VERSION}';",
|
||||
)
|
||||
|
||||
|
||||
# Accent translation
|
||||
ctp_to_colloid = {
|
||||
"rosewater": "pink",
|
||||
"flamingo": "pink",
|
||||
"pink": "pink",
|
||||
"mauve": "purple",
|
||||
"red": "red",
|
||||
"maroon": "red",
|
||||
"peach": "orange",
|
||||
"yellow": "yellow",
|
||||
"green": "green",
|
||||
"teal": "teal",
|
||||
"sky": "teal",
|
||||
"sapphire": "default",
|
||||
"blue": "default",
|
||||
"lavender": "default",
|
||||
}
|
||||
|
||||
|
||||
def translate_accent(ctp_accent: Color):
|
||||
return ctp_to_colloid[ctp_accent.identifier]
|
||||
|
||||
|
||||
def write_tweak(key, default, value):
|
||||
subst_text(
|
||||
f"{SRC_DIR}/sass/_tweaks-temp.scss", f"\\${key}: {default}", f"${key}: {value}"
|
||||
)
|
||||
|
||||
|
||||
def apply_tweaks(ctx: BuildContext):
|
||||
write_tweak("theme", "'default'", f"'{translate_accent(ctx.accent)}'")
|
||||
write_tweak("theme", "'default'", f"'{ctx.accent.identifier}'")
|
||||
|
||||
if ctx.size == "compact":
|
||||
write_tweak("compact", "'false'", "'true'")
|
||||
@@ -476,6 +451,7 @@ def apply_colloid_patches():
|
||||
for patch in [
|
||||
"plank-dark.patch",
|
||||
"plank-light.patch",
|
||||
"theme-func.patch",
|
||||
"sass-palette-frappe.patch",
|
||||
"sass-palette-mocha.patch",
|
||||
"sass-palette-latte.patch",
|
||||
|
Reference in New Issue
Block a user