Commit 2af6a02a authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

tint для для цветов темы в зависимости от rgb

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56467 954022d7-b5bf-4e40-9824-e11837661b57
parent 554f4606
......@@ -270,9 +270,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
for (var i = 0; i < _count; ++i)
{
for(var j = 0, length = g_oThemeColorTint[i].length; j < length; ++j)
var basecolor = g_oColorManager.getThemeColor(i);
var aTints = g_oThemeColorsDefaultModsSpreadsheet[GetDefaultColorModsIndex(basecolor.getR(), basecolor.getG(), basecolor.getB())];
for (var j = 0, length = aTints.length; j < length; ++j)
{
var tint = g_oThemeColorTint[i][j];
var tint = aTints[j];
var color = g_oColorManager.getThemeColor(i, tint);
_ret_array[_cur_index] = new CColor(color.getR(), color.getG(), color.getB());
_cur_index++;
......
......@@ -30,7 +30,8 @@ function colorObjToAscColor(color) {
if(null != color.tint)
tintExcel = color.tint;
var tintPresentation = 0;
var oThemeColorTint = g_oThemeColorTint[color.theme];
var basecolor = g_oColorManager.getThemeColor(color.theme);
var oThemeColorTint = g_oThemeColorsDefaultModsSpreadsheet[GetDefaultColorModsIndex(basecolor.getR(), basecolor.getG(), basecolor.getB())];
if(null != oThemeColorTint)
{
for(var i = 0 , length = oThemeColorTint.length; i < length; ++i)
......
......@@ -18,10 +18,18 @@ var g_nColorTextDefault = 1;
var g_nColorHyperlink = 10;
var g_nColorHyperlinkVisited = 11;
var g_oThemeColorTint = [[0, -4.9989318521683403E-2, -0.14999847407452621, -0.249977111117893, -0.34998626667073579, -0.499984740745262],
[0, 0.499984740745262, 0.34998626667073579, 0.249977111117893, 0.14999847407452621, 4.9989318521683403E-2],
[0, -9.9978637043366805E-2, -0.249977111117893, -0.499984740745262, -0.749992370372631, -0.89999084444715716],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
var g_oThemeColorsDefaultModsSpreadsheet = [
[0, -4.9989318521683403E-2, -0.14999847407452621, -0.249977111117893, -0.34998626667073579, -0.499984740745262],
[0, -9.9978637043366805E-2, -0.249977111117893, -0.499984740745262, -0.749992370372631, -0.89999084444715716],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
[0, 0.89999084444715716, 0.749992370372631, 0.499984740745262, 0.249977111117893, 9.9978637043366805E-2],
[0, 0.499984740745262, 0.34998626667073579, 0.249977111117893, 0.14999847407452621, 4.9989318521683403E-2]];
var g_oThemeColorTint = [[0, -4.9989318521683403E-2, -0.14999847407452621, -0.249977111117893, -0.34998626667073579, -0.499984740745262],//d5
[0, 0.499984740745262, 0.34998626667073579, 0.249977111117893, 0.14999847407452621, 4.9989318521683403E-2],//d1
[0, 0.89999084444715716, 0.749992370372631, 0.499984740745262, 0.249977111117893, 9.9978637043366805E-2],//d2
[0, -9.9978637043366805E-2, -0.249977111117893, -0.499984740745262, -0.749992370372631, -0.89999084444715716],//d4
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],//d3
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
......@@ -297,7 +305,9 @@ function CorrectAscColor(asc_color)
var _index = parseInt(asc_color.get_value());
var _id = (_index / 6) >> 0;
var _pos = _index - _id * 6;
var tint = g_oThemeColorTint[_id][_pos];
var basecolor = g_oColorManager.getThemeColor(_id);
var aTints = g_oThemeColorsDefaultModsSpreadsheet[GetDefaultColorModsIndex(basecolor.getR(), basecolor.getG(), basecolor.getB())];
var tint = aTints[_pos];
ret = g_oColorManager.getThemeColor(_id, tint);
break;
}
......
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