Fix Bug 51845, use 1.25, 1.75 icons

This commit is contained in:
Julia Radzhabova 2021-08-18 15:18:58 +03:00
parent 4c5d962c4f
commit 379c97835a
6 changed files with 53 additions and 6 deletions

View file

@ -231,6 +231,53 @@
}
}
.background-ximage-all(@image, @w: auto, @h: auto, @repeat: no-repeat, @commonimage: true) {
.choose-image-path(@commonimage);
@imagepath: '@{path}/@{image}';
background-image: if(@icon-src-base64, data-uri(%("%s", '@{imagepath}')), ~"url(@{imagepath})");
background-repeat: @repeat;
@1d5ximage: replace(@imagepath, '\.png$', '@1.5x.png');
@1d75ximage: replace(@imagepath, '\.png$', '@1.75x.png');
@1d25ximage: replace(@imagepath, '\.png$', '@1.25x.png');
@2ximage: replace(@imagepath, '\.png$', '@2x.png');
@media only screen {
@media (-webkit-min-device-pixel-ratio: 1.25) and (-webkit-max-device-pixel-ratio: 1.49),
(min-resolution: 1.25dppx) and (max-resolution: 1.49dppx),
(min-resolution: 120dpi) and (max-resolution: 143dpi)
{
background-image: ~"url(@{1d25ximage})";
background-size: @w @h;
}
@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.74),
(min-resolution: 1.5dppx) and (max-resolution: 1.74dppx),
(min-resolution: 144dpi) and (max-resolution: 167dpi)
{
background-image: ~"url(@{1d5ximage})";
background-size: @w @h;
}
@media (-webkit-min-device-pixel-ratio: 1.75) and (-webkit-max-device-pixel-ratio: 1.9),
(min-resolution: 1.75dppx) and (max-resolution: 1.9dppx),
(min-resolution: 168dpi) and (max-resolution: 191dpi)
{
background-image: ~"url(@{1d75ximage})";
background-size: @w @h;
}
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 2dppx),
(min-resolution: 192dpi)
{
background-image: ~"url(@{2ximage})";
background-size: @w @h;
}
}
}
.img-commonctrl {
&.img-colored {
filter: none;

View file

@ -21,13 +21,13 @@
.dimension-picker-unhighlighted {
//background: transparent repeat scroll 0 0;
.background-ximage-v2('dimension-picker/dimension-unhighlighted.png', 18px);
.background-ximage-all('dimension-picker/dimension-unhighlighted.png', 18px);
background-repeat: repeat;
}
.dimension-picker div.dimension-picker-highlighted {
//background: transparent repeat scroll 0 0;
.background-ximage-v2('dimension-picker/dimension-highlighted.png', 18px);
.background-ximage-all('dimension-picker/dimension-highlighted.png', 18px);
background-repeat: repeat;
}

View file

@ -39,7 +39,7 @@
}
.item-gradient {
.background-ximage-v2('right-panels/gradients.png', 150px);
.background-ximage-all('right-panels/gradients.png', 150px);
width:50px;
height:50px;

View file

@ -33,7 +33,7 @@
}
.item-gradient {
.background-ximage('@{common-image-path}/right-panels/gradients.png', '@{common-image-path}/right-panels/gradients@2x.png', 150px);
.background-ximage-all('right-panels/gradients.png', 150px);
width:50px;
height:50px;
}

View file

@ -108,7 +108,7 @@
.item-theme {
width: 88px;
height: 40px;
.background-ximage-v2('../../../../../../sdkjs/common/Images/themes_thumbnail.png', 88px);
.background-ximage-all('../../../../../../sdkjs/common/Images/themes_thumbnail.png', 88px);
background-size: cover
}

View file

@ -27,7 +27,7 @@
}
.item-gradient {
.background-ximage('@{common-image-path}/right-panels/gradients.png', '@{common-image-path}/right-panels/gradients@2x.png', 150px);
.background-ximage-all('right-panels/gradients.png', 150px);
width:50px;
height:50px;
}