[dark theme] correct some components

This commit is contained in:
Maxim Kadushkin 2021-02-18 00:27:58 +03:00
parent 86a441c3a3
commit 1fed5dc207
3 changed files with 15 additions and 3 deletions

View file

@ -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);
}

View file

@ -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}}

View file

@ -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 {