fix #1067 (statistics: colors too similar in classic theme)

This commit is contained in:
rolux 2012-10-09 08:26:04 +00:00
parent 93a9bcb92d
commit 9c3a354090

View file

@ -299,9 +299,7 @@ pandora.ui.statisticsDialog = function() {
(Math.abs(11.5 - parseInt(split[0], 10)) - 0.5) * -11, 1, 0.5
);
if (pandora.user.ui.theme == 'classic') {
color = color.map(function(c) {
return c - 64;
});
color = getColor(color);
}
return color;
},
@ -354,9 +352,7 @@ pandora.ui.statisticsDialog = function() {
key == 'continent' ? value : value.split(', ')[1]
);
if (pandora.user.ui.theme == 'classic') {
color = color.map(function(c) {
return c - 64;
});
color = getColor(color);
}
return color;
},
@ -445,9 +441,7 @@ pandora.ui.statisticsDialog = function() {
var name = version ? getName(value) : value,
color = colors[key][name];
if (pandora.user.ui.theme == 'classic') {
color = color.map(function(c) {
return c - 64;
});
color = getColor(color);
}
return color;
},
@ -514,9 +508,7 @@ pandora.ui.statisticsDialog = function() {
return Math.round(Ox.sum(c) / 2);
});
if (pandora.user.ui.theme == 'classic') {
color = color.map(function(c) {
return c - 64;
});
color = getColor(color);
}
return color;
},
@ -603,6 +595,12 @@ pandora.ui.statisticsDialog = function() {
});
function getColor(color) {
var hsl = Ox.hsl(color);
hsl[2] = 0.4;
return Ox.rgb(hsl);
}
function getName(version) {
var name = '';
Ox.forEach(names, function(v) {