Merge pull request #1202 from ONLYOFFICE/feature/custom-color-style
Feature/custom color style
|
@ -55,7 +55,7 @@ define([
|
||||||
'<% } %>'+
|
'<% } %>'+
|
||||||
'<div>'+
|
'<div>'+
|
||||||
'<div class="cnt-hb img-colorpicker">'+
|
'<div class="cnt-hb img-colorpicker">'+
|
||||||
'<div class="cnt-hb-arrow img-colorpicker"></div>'+
|
'<div class="cnt-hb-arrow"></div>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'<% if (this.changeSaturation) { %>'+
|
'<% if (this.changeSaturation) { %>'+
|
||||||
'<div class="cnt-root">'+
|
'<div class="cnt-root">'+
|
||||||
|
@ -106,6 +106,7 @@ define([
|
||||||
refreshUI();
|
refreshUI();
|
||||||
|
|
||||||
me.trigger('changecolor', me, me.color);
|
me.trigger('changecolor', me, me.color);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var refreshUI = function(){
|
var refreshUI = function(){
|
||||||
|
@ -125,8 +126,7 @@ define([
|
||||||
previewColorText[0].innerHTML = (me.color == 'transparent') ? me.textNoColor : me.color.toUpperCase();
|
previewColorText[0].innerHTML = (me.color == 'transparent') ? me.textNoColor : me.color.toUpperCase();
|
||||||
|
|
||||||
if (arrowSatBrightness.length>0 && arrowHue.length>0) {
|
if (arrowSatBrightness.length>0 && arrowHue.length>0) {
|
||||||
arrowSatBrightness.css('left', saturationVal + '%');
|
arrowSatBrightness.css({'left': saturationVal + '%', 'top': 100 - brightnessVal + '%', 'background-color' : me.color});
|
||||||
arrowSatBrightness.css('top', 100 - brightnessVal + '%');
|
|
||||||
arrowHue.css('top', parseInt(hueVal * 100 / 360.0) + '%');
|
arrowHue.css('top', parseInt(hueVal * 100 / 360.0) + '%');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 88 KiB |
|
@ -327,11 +327,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@img-colorpicker-width: 205px;
|
@img-colorpicker-width: 208px;
|
||||||
.img-colorpicker, .hsb-colorpicker .empty-color:before
|
.img-colorpicker, .hsb-colorpicker .empty-color:before
|
||||||
{
|
{
|
||||||
background-image: if(@icon-src-base64, data-uri(%("%s",'@{common-image-path}/hsbcolorpicker/hsb-colorpicker.png')), ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker.png)");
|
background-image: if(@icon-src-base64, data-uri(%("%s",'@{common-image-path}/hsbcolorpicker/hsb-colorpicker.png')), ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker.png)");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
background-size: @img-colorpicker-width auto;
|
||||||
|
|
||||||
@media only screen {
|
@media only screen {
|
||||||
@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
|
@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
|
||||||
|
@ -350,6 +351,14 @@
|
||||||
background-size: @img-colorpicker-width auto;
|
background-size: @img-colorpicker-width auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pixel-ratio__1_25 & {
|
||||||
|
background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker@1.25x.png)";
|
||||||
|
}
|
||||||
|
|
||||||
|
.pixel-ratio__1_75 & {
|
||||||
|
background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker@1.75x.png)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon.lang-flag {
|
.icon.lang-flag {
|
||||||
|
|
|
@ -38,9 +38,8 @@
|
||||||
width: 63px;
|
width: 63px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
|
border: @scaled-one-px-value-ie solid @border-color-shading-ie;
|
||||||
border: @scaled-one-px-value solid @border-regular-control;
|
border: @scaled-one-px-value solid @border-color-shading;
|
||||||
|
|
||||||
&.top {
|
&.top {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,12 +32,9 @@
|
||||||
|
|
||||||
.cnt-hb {
|
.cnt-hb {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
|
||||||
width: 195px;
|
width: 195px;
|
||||||
height: 196px;
|
height: 196px;
|
||||||
position: relative;
|
position: relative;
|
||||||
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
|
|
||||||
border: @scaled-one-px-value solid @border-regular-control;
|
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +46,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.cnt-sat {
|
.cnt-sat {
|
||||||
width: 10px;
|
width: 12px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
|
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
|
||||||
|
@ -58,21 +55,33 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.cnt-hb-arrow {
|
.cnt-hb-arrow {
|
||||||
width: 9px;
|
display: block;
|
||||||
height: 9px;
|
width: 12px;
|
||||||
margin: -4px;
|
height: 12px;
|
||||||
|
margin: -6px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-position: 0 -196px;
|
border: @scaled-one-px-value-ie solid #000;
|
||||||
|
border: @scaled-one-px-value solid #000;
|
||||||
|
.border-radius(50%);
|
||||||
|
&:after{
|
||||||
|
content: ' ';
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: @scaled-one-px-value-ie solid #fff;
|
||||||
|
border: @scaled-one-px-value solid #fff;
|
||||||
|
.border-radius(50%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cnt-sat-arrow {
|
.cnt-sat-arrow {
|
||||||
width: 14px;
|
width: 20px;
|
||||||
height: 9px;
|
height: 12px;
|
||||||
margin-top: -4px;
|
margin-top: -6px;
|
||||||
margin-left: -3px;
|
margin-left: -4px;
|
||||||
margin-left: calc(-2px - @scaled-one-px-value);
|
margin-left: calc(-3px - @scaled-one-px-value);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-position: -11px -196px;
|
background-position: -12px -196px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-color {
|
.empty-color {
|
||||||
|
|