Commit 51354b02 authored by techird's avatar techird

添加几个皮肤

parents 132599f0 93ba7f99
...@@ -6,7 +6,12 @@ KityMinder.LANG['zh-cn'] = { ...@@ -6,7 +6,12 @@ KityMinder.LANG['zh-cn'] = {
'theme': { 'theme': {
'default': '脑图经典', 'default': '脑图经典',
'snow': '温柔冷光', 'snow': '温柔冷光',
'fresh': '文艺小清新' 'fresh-red': '清新红',
'fresh-soil': '泥土',
'fresh-green': '自然',
'fresh-blue': '天空',
'fresh-purple': '浪漫',
'fresh-pink': '可爱'
}, },
'maintopic': '中心主题', 'maintopic': '中心主题',
'topic': '分支主题', 'topic': '分支主题',
......
...@@ -34,8 +34,8 @@ var OutlineRenderer = kity.createClass('OutlineRenderer', { ...@@ -34,8 +34,8 @@ var OutlineRenderer = kity.createClass('OutlineRenderer', {
.setPosition(outlineBox.x, outlineBox.y) .setPosition(outlineBox.x, outlineBox.y)
.setSize(outlineBox.width, outlineBox.height) .setSize(outlineBox.width, outlineBox.height)
.setRadius(node.getStyle('radius')) .setRadius(node.getStyle('radius'))
.fill(node.getStyle(prefix + 'background')) .fill(node.getStyle(prefix + 'background') || node.getStyle('background'))
.stroke(node.getStyle(prefix + 'stroke'), .stroke(node.getStyle(prefix + 'stroke' || node.getStyle('stroke')),
node.getStyle(prefix + 'stroke-width')); node.getStyle(prefix + 'stroke-width'));
return outlineBox; return outlineBox;
......
KityMinder.registerTheme('fresh', { (function() {
function hsl(h, s, l) {
return kity.Color.createHSL(h, s, l);
}
'name': '文艺小清新', function generate(h) {
return {
'background': '#fefefe',
'background': 'white', 'root-color': 'white',
'root-background': hsl(h, 37, 60),
'root-color': '#fff',
'root-background': '#73bf75',
'root-selected-background': '#73bf75',
'root-stroke': 'none', 'root-stroke': 'none',
'root-font-size': 16, 'root-font-size': 16,
'root-padding': [12, 24], 'root-padding': [12, 24],
...@@ -15,10 +17,9 @@ KityMinder.registerTheme('fresh', { ...@@ -15,10 +17,9 @@ KityMinder.registerTheme('fresh', {
'root-space': 10, 'root-space': 10,
'main-color': '#000', 'main-color': 'black',
'main-background': '#f3f9f3', 'main-background': hsl(h, 33, 95),
'main-selected-background': '#f3f9f3', 'main-stroke': hsl(h, 37, 60),
'main-stroke': '#beddbf',
'main-stroke-width': 1, 'main-stroke-width': 1,
'main-font-size': 16, 'main-font-size': 16,
'main-padding': [6, 20], 'main-padding': [6, 20],
...@@ -28,7 +29,6 @@ KityMinder.registerTheme('fresh', { ...@@ -28,7 +29,6 @@ KityMinder.registerTheme('fresh', {
'sub-color': 'black', 'sub-color': 'black',
'sub-background': 'none', 'sub-background': 'none',
'sub-selected-background': 'none',
'sub-stroke': 'none', 'sub-stroke': 'none',
'sub-font-size': 12, 'sub-font-size': 12,
'sub-padding': [5, 10], 'sub-padding': [5, 10],
...@@ -37,22 +37,36 @@ KityMinder.registerTheme('fresh', { ...@@ -37,22 +37,36 @@ KityMinder.registerTheme('fresh', {
'sub-radius': 5, 'sub-radius': 5,
'sub-space': 5, 'sub-space': 5,
'connect-color': '#80bf82', 'connect-color': hsl(h, 37, 60),
'connect-width': 2, 'connect-width': 1,
'connect-radius': 5, 'connect-radius': 5,
'selected-stroke': '#437152', 'selected-stroke': hsl(h, 26, 30),
'selected-stroke-width': '3', 'selected-stroke-width': '3',
'marquee-background': 'rgba(154,255,156,.1)', 'marquee-background': hsl(h, 100, 80).set('a', 0.1),
'marquee-stroke': '#73bf75', 'marquee-stroke': hsl(h, 37, 60),
'drop-hint-color': '#437152', 'drop-hint-color': hsl(h, 26, 35),
'sub-drop-hint-width': 2, 'drop-hint-width': 5,
'main-drop-hint-width': 4,
'root-drop-hint-width': 4,
'order-hint-area-color': 'rgba(0, 255, 0, .5)', 'order-hint-area-color': hsl(h, 100, 95).set('a', 0.5),
'order-hint-path-color': '#0f0', 'order-hint-path-color': hsl(h, 100, 25),
'order-hint-path-width': 2 'order-hint-path-width': 2
}); };
\ No newline at end of file }
var plans = {
red: 0,
soil: 25,
green: 122,
blue: 204,
purple: 246,
pink: 334
};
for (var name in plans) {
KityMinder.registerTheme('fresh-' + name, generate(plans[name]));
}
})();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment