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) {
'name': '文艺小清新', return kity.Color.createHSL(h, s, l);
}
'background': 'white',
function generate(h) {
'root-color': '#fff', return {
'root-background': '#73bf75', 'background': '#fefefe',
'root-selected-background': '#73bf75',
'root-stroke': 'none', 'root-color': 'white',
'root-font-size': 16, 'root-background': hsl(h, 37, 60),
'root-padding': [12, 24], 'root-stroke': 'none',
'root-margin': [30, 100], 'root-font-size': 16,
'root-radius': 5, 'root-padding': [12, 24],
'root-space': 10, 'root-margin': [30, 100],
'root-radius': 5,
'root-space': 10,
'main-color': '#000',
'main-background': '#f3f9f3',
'main-selected-background': '#f3f9f3', 'main-color': 'black',
'main-stroke': '#beddbf', 'main-background': hsl(h, 33, 95),
'main-stroke-width': 1, 'main-stroke': hsl(h, 37, 60),
'main-font-size': 16, 'main-stroke-width': 1,
'main-padding': [6, 20], 'main-font-size': 16,
'main-margin': 20, 'main-padding': [6, 20],
'main-radius': 3, 'main-margin': 20,
'main-space': 5, 'main-radius': 3,
'main-space': 5,
'sub-color': 'black',
'sub-background': 'none', 'sub-color': 'black',
'sub-selected-background': 'none', 'sub-background': 'none',
'sub-stroke': 'none', 'sub-stroke': 'none',
'sub-font-size': 12, 'sub-font-size': 12,
'sub-padding': [5, 10], 'sub-padding': [5, 10],
'sub-margin': [15, 20], 'sub-margin': [15, 20],
'sub-tree-margin': 30, 'sub-tree-margin': 30,
'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': hsl(h, 100, 95).set('a', 0.5),
'order-hint-path-color': hsl(h, 100, 25),
'order-hint-area-color': 'rgba(0, 255, 0, .5)', 'order-hint-path-width': 2
'order-hint-path-color': '#0f0', };
'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