Commit 93ba7f99 authored by techird's avatar techird

add fresh skins

parent 132599f0
......@@ -6,7 +6,12 @@ KityMinder.LANG['zh-cn'] = {
'theme': {
'default': '脑图经典',
'snow': '温柔冷光',
'fresh': '文艺小清新'
'fresh-red': '清新红',
'fresh-soil': '泥土',
'fresh-green': '自然',
'fresh-blue': '天空',
'fresh-purple': '浪漫',
'fresh-pink': '可爱'
},
'maintopic': '中心主题',
'topic': '分支主题',
......
......@@ -34,8 +34,8 @@ var OutlineRenderer = kity.createClass('OutlineRenderer', {
.setPosition(outlineBox.x, outlineBox.y)
.setSize(outlineBox.width, outlineBox.height)
.setRadius(node.getStyle('radius'))
.fill(node.getStyle(prefix + 'background'))
.stroke(node.getStyle(prefix + 'stroke'),
.fill(node.getStyle(prefix + 'background') || node.getStyle('background'))
.stroke(node.getStyle(prefix + 'stroke' || node.getStyle('stroke')),
node.getStyle(prefix + 'stroke-width'));
return outlineBox;
......
KityMinder.registerTheme('fresh', {
'name': '文艺小清新',
'background': 'white',
'root-color': '#fff',
'root-background': '#73bf75',
'root-selected-background': '#73bf75',
'root-stroke': 'none',
'root-font-size': 16,
'root-padding': [12, 24],
'root-margin': [30, 100],
'root-radius': 5,
'root-space': 10,
'main-color': '#000',
'main-background': '#f3f9f3',
'main-selected-background': '#f3f9f3',
'main-stroke': '#beddbf',
'main-stroke-width': 1,
'main-font-size': 16,
'main-padding': [6, 20],
'main-margin': 20,
'main-radius': 3,
'main-space': 5,
'sub-color': 'black',
'sub-background': 'none',
'sub-selected-background': 'none',
'sub-stroke': 'none',
'sub-font-size': 12,
'sub-padding': [5, 10],
'sub-margin': [15, 20],
'sub-tree-margin': 30,
'sub-radius': 5,
'sub-space': 5,
'connect-color': '#80bf82',
'connect-width': 2,
'connect-radius': 5,
'selected-stroke': '#437152',
'selected-stroke-width': '3',
'marquee-background': 'rgba(154,255,156,.1)',
'marquee-stroke': '#73bf75',
'drop-hint-color': '#437152',
'sub-drop-hint-width': 2,
'main-drop-hint-width': 4,
'root-drop-hint-width': 4,
'order-hint-area-color': 'rgba(0, 255, 0, .5)',
'order-hint-path-color': '#0f0',
'order-hint-path-width': 2
});
\ No newline at end of file
(function() {
function hsl(h, s, l) {
return kity.Color.createHSL(h, s, l);
}
function generate(h) {
return {
'background': '#fefefe',
'root-color': 'white',
'root-background': hsl(h, 37, 60),
'root-stroke': 'none',
'root-font-size': 16,
'root-padding': [12, 24],
'root-margin': [30, 100],
'root-radius': 5,
'root-space': 10,
'main-color': 'black',
'main-background': hsl(h, 33, 95),
'main-stroke': hsl(h, 37, 60),
'main-stroke-width': 1,
'main-font-size': 16,
'main-padding': [6, 20],
'main-margin': 20,
'main-radius': 3,
'main-space': 5,
'sub-color': 'black',
'sub-background': 'none',
'sub-stroke': 'none',
'sub-font-size': 12,
'sub-padding': [5, 10],
'sub-margin': [15, 20],
'sub-tree-margin': 30,
'sub-radius': 5,
'sub-space': 5,
'connect-color': hsl(h, 37, 60),
'connect-width': 1,
'connect-radius': 5,
'selected-stroke': hsl(h, 26, 30),
'selected-stroke-width': '3',
'marquee-background': hsl(h, 100, 80).set('a', 0.1),
'marquee-stroke': hsl(h, 37, 60),
'drop-hint-color': hsl(h, 26, 35),
'drop-hint-width': 5,
'order-hint-area-color': hsl(h, 100, 95).set('a', 0.5),
'order-hint-path-color': hsl(h, 100, 25),
'order-hint-path-width': 2
};
}
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