[common] refactoring
This commit is contained in:
parent
1da03d75b5
commit
4d5880486d
|
@ -126,34 +126,12 @@ define([
|
||||||
return out_object;
|
return out_object;
|
||||||
}
|
}
|
||||||
|
|
||||||
var refresh_sdk_colors = function () {
|
|
||||||
if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) ) {
|
|
||||||
var style = getComputedStyle(document.body);
|
|
||||||
if ( !!window.DE ) {
|
|
||||||
var color_background_normal = style.getPropertyValue('--background-normal');
|
|
||||||
this.api.asc_setSkin({
|
|
||||||
"RulerOutline": style.getPropertyValue('--border-toolbar'),
|
|
||||||
"RulerMarkersFillColor": color_background_normal,
|
|
||||||
"RulerMarkersFillColorOld": color_background_normal,
|
|
||||||
"RulerTableColor1": color_background_normal,
|
|
||||||
"RulerLight": style.getPropertyValue("--canvas-ruler-background"),
|
|
||||||
"RulerDark": style.getPropertyValue("--canvas-ruler-margins-background"),
|
|
||||||
"RulerTextColor": style.getPropertyValue("--canvas-ruler-mark"),
|
|
||||||
"RulerTableColor2": style.getPropertyValue("--canvas-ruler-handle-border"),
|
|
||||||
"RulerTableColor2Old": style.getPropertyValue("--canvas-ruler-handle-border-disabled"),
|
|
||||||
"RulerTabsColor": style.getPropertyValue("--canvas-high-contrast"),
|
|
||||||
"RulerTabsColorOld": style.getPropertyValue("--canvas-high-contrast-disabled"),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
THEME_LIGHT_ID: 'theme-light',
|
THEME_LIGHT_ID: 'theme-light',
|
||||||
THEME_DARK_ID: 'theme-dark',
|
THEME_DARK_ID: 'theme-dark',
|
||||||
|
|
||||||
init: function (api) {
|
init: function (api) {
|
||||||
var me = this;
|
var me = this;
|
||||||
refresh_sdk_colors = refresh_sdk_colors.bind(this);
|
|
||||||
|
|
||||||
$(window).on('storage', function (e) {
|
$(window).on('storage', function (e) {
|
||||||
if ( e.key == 'ui-theme' ) {
|
if ( e.key == 'ui-theme' ) {
|
||||||
|
|
Loading…
Reference in a new issue