From 1fed5dc207416084522bf7cd3b21191c97bef917 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Thu, 18 Feb 2021 00:27:58 +0300 Subject: [PATCH] [dark theme] correct some components --- apps/common/main/lib/controller/Themes.js | 14 +++++++++++++- .../resources/img/toolbar/1x/big/.css.handlebars | 2 +- apps/common/main/resources/less/toolbar.less | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/controller/Themes.js b/apps/common/main/lib/controller/Themes.js index 05baec7d8..1856441a6 100644 --- a/apps/common/main/lib/controller/Themes.js +++ b/apps/common/main/lib/controller/Themes.js @@ -61,8 +61,20 @@ define([ var classname = document.documentElement.className.replace(/theme-\w+\s?/, ''); document.body.className = classname; - this.api.asc_setSkin(sdk_themes_relation[name]); $('body').addClass(name); + this.api.asc_setSkin(sdk_themes_relation[name]); + + 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 + }); + } + Common.localStorage.setItem('ui-theme', name); Common.NotificationCenter.trigger('uitheme:change', name); } diff --git a/apps/common/main/resources/img/toolbar/1x/big/.css.handlebars b/apps/common/main/resources/img/toolbar/1x/big/.css.handlebars index ae99b475e..1479c86a4 100644 --- a/apps/common/main/resources/img/toolbar/1x/big/.css.handlebars +++ b/apps/common/main/resources/img/toolbar/1x/big/.css.handlebars @@ -32,6 +32,6 @@ .toolbar__icon-big.{{name}} { background-position: 0 {{px.offset_y}}; - background-position: var(--button-huge-normal-icon-offset-x,0) {{px.offset_y}}; + background-position: var(--button-xhuge-normal-icon-offset-x,0) {{px.offset_y}}; } {{/sprites}} diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index 51a6107bc..1fd780939 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -406,7 +406,7 @@ // TODO: move to appropriate module .btn-header, .btn-users { &:not(:active) .icon--inverse { - background-position-x: 0; + background-position-x: @button-small-normal-icon-offset-x; } svg.icon {