chore: test

This commit is contained in:
Mattia Astorino 2018-04-20 22:18:31 +02:00
parent 7cff393ca0
commit 0a59805291
No known key found for this signature in database
GPG key ID: 7BE552533AB6D4E2
5 changed files with 38 additions and 23 deletions

View file

@ -53,8 +53,6 @@ export const THEME_ICONS = () => {
} }
}) })
// theme.iconDefinitions._folder_open.iconPath = defaults.icons.theme.iconDefinitions._folder_open.iconPath.replace('.svg', `.accent.${ _accentName }.svg`);
// theme.iconDefinitions._folder_open_build.iconPath = defaults.icons.theme.iconDefinitions._folder_open_build.iconPath.replace('.svg', `.accent.${ _accentName }.svg`);
} else { } else {
getAccentableIcons().forEach(iconname => { getAccentableIcons().forEach(iconname => {
@ -63,8 +61,6 @@ export const THEME_ICONS = () => {
distIcon.iconPath = outIcon.iconPath; distIcon.iconPath = outIcon.iconPath;
}); });
// theme.iconDefinitions._folder_open.iconPath = defaults.icons.theme.iconDefinitions._folder_open.iconPath;
// theme.iconDefinitions._folder_open_build.iconPath = defaults.icons.theme.iconDefinitions._folder_open_build.iconPath;
} }
getVariantIcons().forEach(iconname => { getVariantIcons().forEach(iconname => {
@ -76,12 +72,6 @@ export const THEME_ICONS = () => {
} }
}) })
// theme.iconDefinitions._folder_dark.iconPath = defaults.icons.theme.iconDefinitions._folder_dark.iconPath.replace('.svg', `${ variantName }.svg`);
// theme.iconDefinitions._folder_dark_build.iconPath = defaults.icons.theme.iconDefinitions._folder_dark_build.iconPath.replace('.svg', `${ variantName }.svg`);
// theme.iconDefinitions._folder_light.iconPath = defaults.icons.theme.iconDefinitions._folder_light.iconPath.replace('.svg', `${ variantName }.svg`);
// theme.iconDefinitions["_folder_light_build"].iconPath = defaults.icons.theme.iconDefinitions["_folder_light_build"].iconPath.replace('.svg', `${ variantName }.svg`);
fs.writeFile(themepath, JSON.stringify(theme), { encoding: CHARSET }, (error) => { fs.writeFile(themepath, JSON.stringify(theme), { encoding: CHARSET }, (error) => {
if (error) { if (error) {
deferred.reject(error); deferred.reject(error);

View file

@ -35,7 +35,7 @@
"_folder_ci_open" "_folder_ci_open"
], ],
"changelog": { "changelog": {
"lastversion": "1.5.1" "lastversion": "1.6.0"
}, },
"icons": { "icons": {
"theme": { "theme": {

View file

@ -2,5 +2,4 @@ export interface IThemeCustomProperties {
accent?: string; accent?: string;
accentPrevious?: string; accentPrevious?: string;
themeColours?: string; themeColours?: string;
themeIcons?: string;
} }

View file

@ -2,18 +2,19 @@ import * as vscode from 'vscode';
import { IGenericObject } from "./interfaces/igeneric-object"; import { IGenericObject } from "./interfaces/igeneric-object";
import { THEME_ACCENTS_SETTER } from "./commands/accents-setter/index"; import { THEME_ACCENTS_SETTER } from "./commands/accents-setter/index";
import { THEME_VARIANT } from "./commands/theme-variant/index"; import { THEME_ICONS } from "./commands/theme-icons/index";
import { shouldShowChangelog, showChangelog } from './helpers/changelog'; import { shouldShowChangelog, showChangelog } from './helpers/changelog';
import { reloadWindow } from "./helpers/vscode";
enum Commands { enum Commands {
ACCENTS, ACCENTS,
CHANGELOG, CHANGELOG,
COLOUR_VARIANT THEME_ICONS
} }
const OPTIONS: IGenericObject<number> = { const OPTIONS: IGenericObject<number> = {
'🖍 Change accent color': Commands.ACCENTS, '🖍 Change accent color': Commands.ACCENTS,
'🎨 Change color variant': Commands.COLOUR_VARIANT, '🎨 Adapt icons': Commands.THEME_ICONS,
'🚧 Show changelog': Commands.CHANGELOG '🚧 Show changelog': Commands.CHANGELOG
} }
@ -38,8 +39,8 @@ export function activate(context: vscode.ExtensionContext) {
case Commands.CHANGELOG: case Commands.CHANGELOG:
showChangelog(); showChangelog();
break; break;
case Commands.COLOUR_VARIANT: case Commands.THEME_ICONS:
THEME_VARIANT(); THEME_ICONS().then(() => reloadWindow()).catch(error => console.trace(error));
break; break;
} }
}); });

View file

@ -58,11 +58,6 @@
], ],
"configuration": { "configuration": {
"properties": { "properties": {
"materialTheme.cache.workbench.accent": {
"type": "string",
"title": "[DEPRECATED] This is an old property.",
"description": "This property is intended only for migrating old settings system to a new one. It will be removed in new versions. Don't use it, use \"materialTheme.cache.workbench.settings\" instead."
},
"materialTheme.cache.workbench.settings": { "materialTheme.cache.workbench.settings": {
"default": {}, "default": {},
"type": "object", "type": "object",
@ -74,13 +69,43 @@
"themes": [ "themes": [
{ {
"label": "Material Theme", "label": "Material Theme",
"path": "./themes/Material-Theme-Palenight.json", "path": "./themes/Material-Theme-Default.json",
"uiTheme": "vs-dark"
},
{
"label": "Material Theme High Contrast",
"path": "./themes/Material-Theme-Default-High-Contrast.json",
"uiTheme": "vs-dark" "uiTheme": "vs-dark"
}, },
{ {
"label": "Material Theme Darker", "label": "Material Theme Darker",
"path": "./themes/Material-Theme-Darker.json", "path": "./themes/Material-Theme-Darker.json",
"uiTheme": "vs-dark" "uiTheme": "vs-dark"
},
{
"label": "Material Theme Darker High Contrast",
"path": "./themes/Material-Theme-Darker-High-Contrast.json",
"uiTheme": "vs-dark"
},
{
"label": "Material Theme Palenight",
"path": "./themes/Material-Theme-Palenight.json",
"uiTheme": "vs-dark"
},
{
"label": "Material Theme Palenight High Contrast",
"path": "./themes/Material-Theme-Palenight-High-Contrast.json",
"uiTheme": "vs-dark"
},
{
"label": "Material Theme Lighter",
"path": "./themes/Material-Theme-Lighter.json",
"uiTheme": "vs"
},
{
"label": "Material Theme Lighter High Contrast",
"path": "./themes/Material-Theme-Lighter-High-Contrast.json",
"uiTheme": "vs"
} }
], ],
"iconThemes": [ "iconThemes": [