From 7bbea625583b1824860f3cd09bca581d9c0481dd Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 25 Feb 2022 14:56:24 +0100 Subject: [PATCH] Add base_colors to theme If the value of a color is a string, there will be an attempt to fetch this color from base_colors. CURA-8688 --- resources/themes/cura-dark/theme.json | 24 +++++++++++++++++++++++- resources/themes/cura-light/theme.json | 25 +++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 296d4d7145..abf6e1bf2f 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -4,8 +4,30 @@ "inherits": "cura-light" }, + "base_colors": + { + "background_1": [212, 212, 212, 255], + "background_2": [57, 57, 58, 255], + "background_3": [85, 85, 87, 255], + "background_4": [23, 23, 23, 255], + + "accent_1": [25, 110, 240, 255], + "accent_2": [16, 70, 156, 255], + "border_main": [212, 212, 212, 255], + "border_accent_1": [255, 255, 255, 255], + "border_accent_2": [16, 70, 156, 255], + "border_field": [57, 57, 58, 255], + + "text_default": [255, 255, 255, 255], + "text_disabled": [118, 118, 118, 255], + "text_primary_button": [255, 255, 255, 255], + "text_secondary_button": [255, 255, 255, 255], + "text_link_hover": [156, 195, 255, 255], + "text_lighter": [243, 243, 243, 255] + }, + "colors": { - "main_background": [39, 44, 48, 255], + "main_background": "background_1", "detail_background": [63, 63, 63, 255], "message_background": [39, 44, 48, 255], "wide_lining": [31, 36, 39, 255], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 3754a0fb64..a7cc206766 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -170,10 +170,31 @@ } }, + "base_colors": { + "background_1": [255, 255, 255, 255], + "background_2": [243, 243, 243, 255], + "background_3": [232, 240, 253, 255], + "background_4": [3, 12, 66, 255], + + "accent_1": [25, 110, 240, 255], + "accent_2": [16, 70, 156, 255], + "border_main": [212, 212, 212, 255], + "border_accent_1": [25, 110, 240, 255], + "border_accent_2": [16, 70, 156, 255], + "border_field": [180, 180, 180, 255], + + "text_default": [0, 14, 26, 255], + "text_disabled": [180, 180, 180, 255], + "text_primary_button": [255, 255, 255, 255], + "text_secondary_button": [25, 110, 240, 255], + "text_link_hover": [16, 70, 156, 255], + "text_lighter": [108, 108, 108, 255] + }, + "colors": { - "main_background": [255, 255, 255, 255], - "detail_background": [243, 243, 243, 255], + "main_background": "background_1", + "detail_background": "background_2", "wide_lining": [245, 245, 245, 255], "thick_lining": [180, 180, 180, 255], "lining": [192, 193, 194, 255],