[DE mobile] Fix text auto color

This commit is contained in:
Julia Radzhabova 2020-10-28 16:55:22 +03:00
parent 2872f42cc3
commit e69c7968ad
6 changed files with 30 additions and 6 deletions

View file

@ -164,3 +164,8 @@
}
}
}
#font-color-auto.active .color-auto {
box-shadow: 0 0 0 1px white, 0 0 0 4px @themeColor;
border-radius: 1px;
}

View file

@ -168,4 +168,8 @@
}
}
}
}
}
#font-color-auto.active .color-auto {
box-shadow: 0 0 0 1px white, 0 0 0 4px @themeColor;
border-radius: 1px;
}

View file

@ -370,7 +370,9 @@ define([
}
if (this.api) {
this.api.put_TextColor(Common.Utils.ThemeColor.getRgbColor("000000"));
var color = new Asc.asc_CColor();
color.put_auto(true);
this.api.put_TextColor(color);
}
},
@ -480,12 +482,17 @@ define([
onApiTextColor: function (color) {
var me = this;
var palette = this.getView('EditText').paletteTextColor;
if (color.get_auto()) {
if (palette) {
palette.clearSelection();
}
$('#font-color .color-preview').css('background-color', '#000');
$('#font-color-auto').addClass('active');
} else {
var palette = me.getView('EditText').paletteTextColor,
clr;
var clr;
if (color) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
@ -499,7 +506,7 @@ define([
$('#font-color .color-preview').css('background-color', '#' + (_.isObject(clr) ? clr.color : clr));
}
$('#font-color-auto').removeClass('active');
if (palette) {
palette.select(clr);
}

View file

@ -158,7 +158,7 @@
<a id="font-color-auto" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<div style="width:22px; height: 22px; background-color: #000;"></div>
<div class="color-auto" style="width:22px; height: 22px; background-color: #000;"></div>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textAutomatic %></div>

View file

@ -6354,6 +6354,10 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after
.custom-colors .color-picker-wheel .color-picker-sb-spectrum-handle.color-picker-sb-spectrum-handle-pressed:after {
transform: scale(1.5) translate(-33.333%, -33.333%);
}
#font-color-auto.active .color-auto {
box-shadow: 0 0 0 1px white, 0 0 0 4px #446995;
border-radius: 1px;
}
.about .page-content {
text-align: center;
}

View file

@ -5929,6 +5929,10 @@ html.phone .document-menu .list-block .item-link {
.custom-colors .color-picker-wheel .color-picker-sb-spectrum-handle.color-picker-sb-spectrum-handle-pressed:after {
transform: scale(1.5) translate(-33.333%, -33.333%);
}
#font-color-auto.active .color-auto {
box-shadow: 0 0 0 1px white, 0 0 0 4px #446995;
border-radius: 1px;
}
.about .page-content {
text-align: center;
}