diff --git a/config/themes.json b/config/themes.json index 2c11a09d..c3ee4fe4 100644 --- a/config/themes.json +++ b/config/themes.json @@ -1,220 +1,221 @@ { - "Classic": { - "CustomDialogFontSize": "12", - "CustomDialogFontSizeHeader": "14", - "CustomDialogIconSize": "25", - "CustomDialogWidth": "400", - "CustomDialogHeight": "200", + "$schema": "../schemas/config/themes.json", + "Classic": { + "CustomDialogFontSize": "12", + "CustomDialogFontSizeHeader": "14", + "CustomDialogIconSize": "25", + "CustomDialogWidth": "400", + "CustomDialogHeight": "200", - "FontSize": "12", - "FontFamily": "Arial", - "FontSizeHeading": "14", - "HeaderFontFamily": "Consolas, Monaco", + "FontSize": "12", + "FontFamily": "Arial", + "FontSizeHeading": "14", + "HeaderFontFamily": "Consolas, Monaco", - "CheckBoxBulletDecoratorFontSize": "14", - "CheckBoxMargin": "15,0,0,2", + "CheckBoxBulletDecoratorFontSize": "14", + "CheckBoxMargin": "15,0,0,2", - "TabButtonFontSize": "14", - "TabButtonWidth": "100", - "TabButtonHeight": "25", - "TabRowHeightInPixels": "50", - "IconFontSize": "14", - "IconButtonSize": "35", - "WinUtilIconSize": "Auto", - "SettingsIconFontSize": "18", + "TabButtonFontSize": "14", + "TabButtonWidth": "100", + "TabButtonHeight": "25", + "TabRowHeightInPixels": "50", + "IconFontSize": "14", + "IconButtonSize": "35", + "WinUtilIconSize": "Auto", + "SettingsIconFontSize": "18", - "MicroWinLogoSize": "10", + "MicroWinLogoSize": "10", - "ProgressBarForegroundColor": "#FFAC1C", - "ProgressBarBackgroundColor": "Transparent", - "ProgressBarTextColor": "#000000", + "ProgressBarForegroundColor": "#FFAC1C", + "ProgressBarBackgroundColor": "Transparent", + "ProgressBarTextColor": "#000000", - "ComboBoxBackgroundColor": "#FFFFFF", - "LabelboxForegroundColor": "#000000", - "MainForegroundColor": "#000000", - "MainBackgroundColor": "#FFFFFF", - "LabelBackgroundColor": "#FAFAFA", - "LinkForegroundColor": "#000000", - "LinkHoverForegroundColor": "#000000", - "GroupBorderBackgroundColor": "#000000", - "ComboBoxForegroundColor": "#000000", + "ComboBoxBackgroundColor": "#FFFFFF", + "LabelboxForegroundColor": "#000000", + "MainForegroundColor": "#000000", + "MainBackgroundColor": "#FFFFFF", + "LabelBackgroundColor": "#FAFAFA", + "LinkForegroundColor": "#000000", + "LinkHoverForegroundColor": "#000000", + "GroupBorderBackgroundColor": "#000000", + "ComboBoxForegroundColor": "#000000", - "ButtonFontSize": "12", - "ButtonFontFamily": "Arial", - "ButtonWidth": "200", - "ButtonHeight": "25", - "ConfigTabButtonFontSize": "16", + "ButtonFontSize": "12", + "ButtonFontFamily": "Arial", + "ButtonWidth": "200", + "ButtonHeight": "25", + "ConfigTabButtonFontSize": "16", - "SearchBarWidth": "200", - "SearchBarHeight": "25", - "SearchBarTextBoxFontSize": "16", - "SearchBarClearButtonFontSize": "14", + "SearchBarWidth": "200", + "SearchBarHeight": "25", + "SearchBarTextBoxFontSize": "16", + "SearchBarClearButtonFontSize": "14", - "ButtonInstallBackgroundColor": "#FFFFFF", - "ButtonTweaksBackgroundColor": "#FFFFFF", - "ButtonConfigBackgroundColor": "#FFFFFF", - "ButtonUpdatesBackgroundColor": "#FFFFFF", - "ButtonInstallForegroundColor": "#000000", - "ButtonTweaksForegroundColor": "#000000", - "ButtonConfigForegroundColor": "#000000", - "ButtonUpdatesForegroundColor": "#000000", - "ButtonBackgroundColor": "#F5F5F5", - "ButtonBackgroundPressedColor": "#1A1A1A", - "CheckboxMouseOverColor": "#999999", - "ButtonBackgroundMouseoverColor": "#C2C2C2", - "ButtonBackgroundSelectedColor": "#F0F0F0", - "ButtonForegroundColor": "#000000", - "ToggleButtonOnColor": "#2e77ff", + "ButtonInstallBackgroundColor": "#FFFFFF", + "ButtonTweaksBackgroundColor": "#FFFFFF", + "ButtonConfigBackgroundColor": "#FFFFFF", + "ButtonUpdatesBackgroundColor": "#FFFFFF", + "ButtonInstallForegroundColor": "#000000", + "ButtonTweaksForegroundColor": "#000000", + "ButtonConfigForegroundColor": "#000000", + "ButtonUpdatesForegroundColor": "#000000", + "ButtonBackgroundColor": "#F5F5F5", + "ButtonBackgroundPressedColor": "#1A1A1A", + "CheckboxMouseOverColor": "#999999", + "ButtonBackgroundMouseoverColor": "#C2C2C2", + "ButtonBackgroundSelectedColor": "#F0F0F0", + "ButtonForegroundColor": "#000000", + "ToggleButtonOnColor": "#2e77ff", - "ButtonBorderThickness": "1", - "ButtonMargin": "1", - "ButtonCornerRadius": "2", - "BorderColor": "#000000", - "BorderOpacity": "0.2", - "ShadowPulse": "Forever" - }, - "Matrix": { - "CustomDialogFontSize": "12", - "CustomDialogFontSizeHeader": "14", - "CustomDialogIconSize": "25", - "CustomDialogWidth": "400", - "CustomDialogHeight": "200", + "ButtonBorderThickness": "1", + "ButtonMargin": "1", + "ButtonCornerRadius": "2", + "BorderColor": "#000000", + "BorderOpacity": "0.2", + "ShadowPulse": "Forever" + }, + "Matrix": { + "CustomDialogFontSize": "12", + "CustomDialogFontSizeHeader": "14", + "CustomDialogIconSize": "25", + "CustomDialogWidth": "400", + "CustomDialogHeight": "200", - "FontSize": "12", - "FontFamily": "Arial", - "FontSizeHeading": "14", - "HeaderFontFamily": "Consolas, Monaco", + "FontSize": "12", + "FontFamily": "Arial", + "FontSizeHeading": "14", + "HeaderFontFamily": "Consolas, Monaco", - "CheckBoxBulletDecoratorFontSize": "14", - "CheckBoxMargin": "15,0,0,2", + "CheckBoxBulletDecoratorFontSize": "14", + "CheckBoxMargin": "15,0,0,2", - "TabButtonFontSize": "14", - "TabButtonWidth": "100", - "TabButtonHeight": "25", - "TabRowHeightInPixels": "50", - "IconFontSize": "14", - "IconButtonSize": "35", - "WinUtilIconSize": "Auto", - "SettingsIconFontSize": "18", + "TabButtonFontSize": "14", + "TabButtonWidth": "100", + "TabButtonHeight": "25", + "TabRowHeightInPixels": "50", + "IconFontSize": "14", + "IconButtonSize": "35", + "WinUtilIconSize": "Auto", + "SettingsIconFontSize": "18", - "MicroWinLogoSize": "10", + "MicroWinLogoSize": "10", - "ProgressBarForegroundColor": "#222222", - "ProgressBarBackgroundColor": "Transparent", - "ProgressBarTextColor": "#cccccc", + "ProgressBarForegroundColor": "#222222", + "ProgressBarBackgroundColor": "Transparent", + "ProgressBarTextColor": "#cccccc", - "ComboBoxBackgroundColor": "#000000", - "LabelboxForegroundColor": "#FFEE58", - "MainForegroundColor": "#9CCC65", - "MainBackgroundColor": "#000000", - "LabelBackgroundColor": "#000000", - "LinkForegroundColor": "#add8e6", - "LinkHoverForegroundColor": "#FFFFFF", - "ComboBoxForegroundColor": "#FFEE58", + "ComboBoxBackgroundColor": "#000000", + "LabelboxForegroundColor": "#FFEE58", + "MainForegroundColor": "#9CCC65", + "MainBackgroundColor": "#000000", + "LabelBackgroundColor": "#000000", + "LinkForegroundColor": "#add8e6", + "LinkHoverForegroundColor": "#FFFFFF", + "ComboBoxForegroundColor": "#FFEE58", - "ButtonFontSize": "12", - "ButtonFontFamily": "Arial", - "ButtonWidth": "200", - "ButtonHeight": "25", - "ConfigTabButtonFontSize": "16", + "ButtonFontSize": "12", + "ButtonFontFamily": "Arial", + "ButtonWidth": "200", + "ButtonHeight": "25", + "ConfigTabButtonFontSize": "16", - "SearchBarWidth": "200", - "SearchBarHeight": "25", - "SearchBarTextBoxFontSize": "16", - "SearchBarClearButtonFontSize": "14", + "SearchBarWidth": "200", + "SearchBarHeight": "25", + "SearchBarTextBoxFontSize": "16", + "SearchBarClearButtonFontSize": "14", - "ButtonInstallBackgroundColor": "#222222", - "ButtonTweaksBackgroundColor": "#333333", - "ButtonConfigBackgroundColor": "#444444", - "ButtonUpdatesBackgroundColor": "#555555", - "ButtonInstallForegroundColor": "#FFFFFF", - "ButtonTweaksForegroundColor": "#FFFFFF", - "ButtonConfigForegroundColor": "#FFFFFF", - "ButtonUpdatesForegroundColor": "#FFFFFF", - "ButtonBackgroundColor": "#000019", - "ButtonBackgroundPressedColor": "#FFFFFF", - "ButtonBackgroundMouseoverColor": "#A55A64", - "ButtonBackgroundSelectedColor": "#FF5733", - "ButtonForegroundColor": "#9CCC65", - "ToggleButtonOnColor": "#2e77ff", + "ButtonInstallBackgroundColor": "#222222", + "ButtonTweaksBackgroundColor": "#333333", + "ButtonConfigBackgroundColor": "#444444", + "ButtonUpdatesBackgroundColor": "#555555", + "ButtonInstallForegroundColor": "#FFFFFF", + "ButtonTweaksForegroundColor": "#FFFFFF", + "ButtonConfigForegroundColor": "#FFFFFF", + "ButtonUpdatesForegroundColor": "#FFFFFF", + "ButtonBackgroundColor": "#000019", + "ButtonBackgroundPressedColor": "#FFFFFF", + "ButtonBackgroundMouseoverColor": "#A55A64", + "ButtonBackgroundSelectedColor": "#FF5733", + "ButtonForegroundColor": "#9CCC65", + "ToggleButtonOnColor": "#2e77ff", - "ButtonBorderThickness": "1", - "ButtonMargin": "1", - "ButtonCornerRadius": "2", - "BorderColor": "#FFAC1C", - "BorderOpacity": "0.8", - "ShadowPulse": "0:0:3" - }, - "Dark": { - "CustomDialogFontSize": "12", - "CustomDialogFontSizeHeader": "14", - "CustomDialogIconSize": "25", - "CustomDialogWidth": "400", - "CustomDialogHeight": "200", + "ButtonBorderThickness": "1", + "ButtonMargin": "1", + "ButtonCornerRadius": "2", + "BorderColor": "#FFAC1C", + "BorderOpacity": "0.8", + "ShadowPulse": "0:0:3" + }, + "Dark": { + "CustomDialogFontSize": "12", + "CustomDialogFontSizeHeader": "14", + "CustomDialogIconSize": "25", + "CustomDialogWidth": "400", + "CustomDialogHeight": "200", - "FontSize": "12", - "FontFamily": "Arial", - "FontSizeHeading": "14", - "HeaderFontFamily": "Consolas, Monaco", + "FontSize": "12", + "FontFamily": "Arial", + "FontSizeHeading": "14", + "HeaderFontFamily": "Consolas, Monaco", - "CheckBoxBulletDecoratorFontSize": "14", - "CheckBoxMargin": "15,0,0,2", + "CheckBoxBulletDecoratorFontSize": "14", + "CheckBoxMargin": "15,0,0,2", - "TabButtonFontSize": "14", - "TabButtonWidth": "100", - "TabButtonHeight": "25", - "TabRowHeightInPixels": "50", - "IconFontSize": "14", - "IconButtonSize": "35", - "WinUtilIconSize": "Auto", - "SettingsIconFontSize": "18", + "TabButtonFontSize": "14", + "TabButtonWidth": "100", + "TabButtonHeight": "25", + "TabRowHeightInPixels": "50", + "IconFontSize": "14", + "IconButtonSize": "35", + "WinUtilIconSize": "Auto", + "SettingsIconFontSize": "18", - "MicroWinLogoSize": "10", + "MicroWinLogoSize": "10", - "ProgressBarForegroundColor": "#222222", - "ProgressBarBackgroundColor": "Transparent", - "ProgressBarTextColor": "#FFFFFF", + "ProgressBarForegroundColor": "#222222", + "ProgressBarBackgroundColor": "Transparent", + "ProgressBarTextColor": "#FFFFFF", - "ComboBoxBackgroundColor": "#000000", - "LabelboxForegroundColor": "#FFEE58", - "MainForegroundColor": "#9CCC65", - "MainBackgroundColor": "#000000", - "LabelBackgroundColor": "#000000", - "LinkForegroundColor": "#add8e6", - "LinkHoverForegroundColor": "#FFFFFF", - "ComboBoxForegroundColor": "#FFEE58", + "ComboBoxBackgroundColor": "#000000", + "LabelboxForegroundColor": "#FFEE58", + "MainForegroundColor": "#9CCC65", + "MainBackgroundColor": "#000000", + "LabelBackgroundColor": "#000000", + "LinkForegroundColor": "#add8e6", + "LinkHoverForegroundColor": "#FFFFFF", + "ComboBoxForegroundColor": "#FFEE58", - "ButtonFontSize": "12", - "ButtonFontFamily": "Arial", - "ButtonWidth": "200", - "ButtonHeight": "25", - "ConfigTabButtonFontSize": "16", + "ButtonFontSize": "12", + "ButtonFontFamily": "Arial", + "ButtonWidth": "200", + "ButtonHeight": "25", + "ConfigTabButtonFontSize": "16", - "SearchBarWidth": "200", - "SearchBarHeight": "25", - "SearchBarTextBoxFontSize": "16", - "SearchBarClearButtonFontSize": "14", + "SearchBarWidth": "200", + "SearchBarHeight": "25", + "SearchBarTextBoxFontSize": "16", + "SearchBarClearButtonFontSize": "14", - "ButtonInstallBackgroundColor": "#222222", - "ButtonTweaksBackgroundColor": "#333333", - "ButtonConfigBackgroundColor": "#444444", - "ButtonUpdatesBackgroundColor": "#555555", - "ButtonInstallForegroundColor": "#FFFFFF", - "ButtonTweaksForegroundColor": "#FFFFFF", - "ButtonConfigForegroundColor": "#FFFFFF", - "ButtonUpdatesForegroundColor": "#FFFFFF", - "ButtonBackgroundColor": "#000019", - "ButtonBackgroundPressedColor": "#9CCC65", - "ButtonBackgroundMouseoverColor": "#FF5733", - "ButtonBackgroundSelectedColor": "#FF5733", - "ButtonForegroundColor": "#9CCC65", - "ToggleButtonOnColor": "#2e77ff", + "ButtonInstallBackgroundColor": "#222222", + "ButtonTweaksBackgroundColor": "#333333", + "ButtonConfigBackgroundColor": "#444444", + "ButtonUpdatesBackgroundColor": "#555555", + "ButtonInstallForegroundColor": "#FFFFFF", + "ButtonTweaksForegroundColor": "#FFFFFF", + "ButtonConfigForegroundColor": "#FFFFFF", + "ButtonUpdatesForegroundColor": "#FFFFFF", + "ButtonBackgroundColor": "#000019", + "ButtonBackgroundPressedColor": "#9CCC65", + "ButtonBackgroundMouseoverColor": "#FF5733", + "ButtonBackgroundSelectedColor": "#FF5733", + "ButtonForegroundColor": "#9CCC65", + "ToggleButtonOnColor": "#2e77ff", - "ButtonBorderThickness": "1", - "ButtonMargin": "1", - "ButtonCornerRadius": "2", - "BorderColor": "#FFAC1C", - "BorderOpacity": "0.2", - "ShadowPulse": "Forever" - } + "ButtonBorderThickness": "1", + "ButtonMargin": "1", + "ButtonCornerRadius": "2", + "BorderColor": "#FFAC1C", + "BorderOpacity": "0.2", + "ShadowPulse": "Forever" + } } diff --git a/schemas/config/themes.json b/schemas/config/themes.json new file mode 100644 index 00000000..150b79d5 --- /dev/null +++ b/schemas/config/themes.json @@ -0,0 +1,235 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "color": { + "type": "string", + "pattern": "^Transparent|(#[0-9A-Fa-f]{6})$" + }, + "decimal": { + "type": "string", + "pattern": "^\\d+(\\.\\d+)?$" + } + }, + "type": "object", + "patternProperties": { + "^[a-zA-Z_][a-zA-Z0-9_]*$": { + "type": "object", + "properties": { + "CustomDialogFontSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "CustomDialogFontSizeHeader": { + "type": "string", + "pattern": "^\\d+$" + }, + "CustomDialogIconSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "CustomDialogWidth": { + "type": "string", + "pattern": "^\\d+$" + }, + "CustomDialogHeight": { + "type": "string", + "pattern": "^\\d+$" + }, + "FontSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "FontFamily": { + "type": "string" + }, + "FontSizeHeading": { + "type": "string", + "pattern": "^\\d+$" + }, + "HeaderFontFamily": { + "type": "string" + }, + "CheckBoxBulletDecoratorFontSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "CheckBoxMargin": { + "type": "string" + }, + "TabButtonFontSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "TabButtonWidth": { + "type": "string", + "pattern": "^\\d+$" + }, + "TabButtonHeight": { + "type": "string", + "pattern": "^\\d+$" + }, + "TabRowHeightInPixels": { + "type": "string", + "pattern": "^\\d+$" + }, + "IconFontSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "IconButtonSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "WinUtilIconSize": { + "type": "string" + }, + "SettingsIconFontSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "MicroWinLogoSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "ProgressBarForegroundColor": { + "$ref": "#/definitions/color" + }, + "ProgressBarBackgroundColor": { + "$ref": "#/definitions/color" + }, + "ProgressBarTextColor": { + "$ref": "#/definitions/color" + }, + "ComboBoxBackgroundColor": { + "$ref": "#/definitions/color" + }, + "LabelboxForegroundColor": { + "$ref": "#/definitions/color" + }, + "MainForegroundColor": { + "$ref": "#/definitions/color" + }, + "MainBackgroundColor": { + "$ref": "#/definitions/color" + }, + "LabelBackgroundColor": { + "$ref": "#/definitions/color" + }, + "LinkForegroundColor": { + "$ref": "#/definitions/color" + }, + "LinkHoverForegroundColor": { + "$ref": "#/definitions/color" + }, + "GroupBorderBackgroundColor": { + "$ref": "#/definitions/color" + }, + "ComboBoxForegroundColor": { + "$ref": "#/definitions/color" + }, + "ButtonFontSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "ButtonFontFamily": { + "type": "string" + }, + "ButtonWidth": { + "type": "string", + "pattern": "^\\d+$" + }, + "ButtonHeight": { + "type": "string", + "pattern": "^\\d+$" + }, + "ConfigTabButtonFontSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "SearchBarWidth": { + "type": "string", + "pattern": "^\\d+$" + }, + "SearchBarHeight": { + "type": "string", + "pattern": "^\\d+$" + }, + "SearchBarTextBoxFontSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "SearchBarClearButtonFontSize": { + "type": "string", + "pattern": "^\\d+$" + }, + "ButtonInstallBackgroundColor": { + "$ref": "#/definitions/color" + }, + "ButtonTweaksBackgroundColor": { + "$ref": "#/definitions/color" + }, + "ButtonConfigBackgroundColor": { + "$ref": "#/definitions/color" + }, + "ButtonUpdatesBackgroundColor": { + "$ref": "#/definitions/color" + }, + "ButtonInstallForegroundColor": { + "$ref": "#/definitions/color" + }, + "ButtonTweaksForegroundColor": { + "$ref": "#/definitions/color" + }, + "ButtonConfigForegroundColor": { + "$ref": "#/definitions/color" + }, + "ButtonUpdatesForegroundColor": { + "$ref": "#/definitions/color" + }, + "ButtonBackgroundColor": { + "$ref": "#/definitions/color" + }, + "ButtonBackgroundPressedColor": { + "$ref": "#/definitions/color" + }, + "CheckboxMouseOverColor": { + "$ref": "#/definitions/color" + }, + "ButtonBackgroundMouseoverColor": { + "$ref": "#/definitions/color" + }, + "ButtonBackgroundSelectedColor": { + "$ref": "#/definitions/color" + }, + "ButtonForegroundColor": { + "$ref": "#/definitions/color" + }, + "ToggleButtonOnColor": { + "$ref": "#/definitions/color" + }, + "ButtonBorderThickness": { + "type": "string", + "pattern": "^\\d+$" + }, + "ButtonMargin": { + "type": "string", + "pattern": "^\\d+$" + }, + "ButtonCornerRadius": { + "type": "string", + "pattern": "^\\d+$" + }, + "BorderColor": { + "$ref": "#/definitions/color" + }, + "BorderOpacity": { + "$ref": "#/definitions/decimal" + }, + "ShadowPulse": { + "type": "string" + } + }, + "required": [] + } + } +}