[all] unlocked adapt to 150% system scaling

This commit is contained in:
Maxim Kadushkin 2020-11-20 22:57:20 +03:00
parent 53948517ac
commit 89f733ae30
5 changed files with 37 additions and 36 deletions

View file

@ -120,7 +120,7 @@ Common.Utils = _.extend(new(function() {
me = this,
checkSize = function() {
me.zoom = 1;
if (isChrome && !isOpera && !isMobile && document && document.firstElementChild && document.body) {
if (false && isChrome && !isOpera && !isMobile && document && document.firstElementChild && document.body) {
// делаем простую проверку
// считаем: 0 < window.devicePixelRatio < 2 => _devicePixelRatio = 1; zoom = window.devicePixelRatio / _devicePixelRatio;
// считаем: window.devicePixelRatio >= 2 => _devicePixelRatio = 2; zoom = window.devicePixelRatio / _devicePixelRatio;
@ -137,7 +137,8 @@ Common.Utils = _.extend(new(function() {
}
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
//document.firstElementChild.style.zoom = "reset";
document.firstElementChild.style.zoom = 1.0 / me.zoom; }
document.firstElementChild.style.zoom = 1.0 / me.zoom;
}
else
document.firstElementChild.style.zoom = "normal";
}

View file

@ -180,13 +180,13 @@
@2ximage: replace(@imagepath, '\.png$', '@2x.png');
@media only screen {
// @media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
// (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
// (min-resolution: 144dpi) and (max-resolution: 191dpi)
// {
// background-image: ~"url(@{1d5ximage})";
// background-size: @w @h;
// }
@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
(min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
(min-resolution: 144dpi) and (max-resolution: 191dpi)
{
background-image: ~"url(@{1d5ximage})";
background-size: @w @h;
}
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 2dppx),
@ -210,13 +210,13 @@
@2ximage: replace(@common-controls, '\.png$', '@2x.png');
@media only screen {
//@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
// (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
// (min-resolution: 144dpi) and (max-resolution: 191dpi)
//{
// background-image: ~"url(@{common-image-const-path}/@{1d5ximage})";
// background-size: @common-controls-width auto;
//}
@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
(min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
(min-resolution: 144dpi) and (max-resolution: 191dpi)
{
background-image: ~"url(@{common-image-const-path}/@{1d5ximage})";
background-size: @common-controls-width auto;
}
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 2dppx),
@ -235,13 +235,13 @@
background-repeat: no-repeat;
@media only screen {
//@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
// (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
// (min-resolution: 144dpi) and (max-resolution: 191dpi)
//{
// background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker@1.5x.png)";
// background-size: @img-colorpicker-width auto;
//}
@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
(min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
(min-resolution: 144dpi) and (max-resolution: 191dpi)
{
background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker@1.5x.png)";
background-size: @img-colorpicker-width auto;
}
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 2dppx),
@ -263,13 +263,13 @@
background-repeat: no-repeat;
@media only screen {
//@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
// (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
// (min-resolution: 144dpi) and (max-resolution: 191dpi)
//{
// background-image: ~"url(@{common-image-const-path}/controls/flags@1.5x.png)";
// background-size: @img-flags-width auto;
//}
@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
(min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
(min-resolution: 144dpi) and (max-resolution: 191dpi)
{
background-image: ~"url(@{common-image-const-path}/controls/flags@1.5x.png)";
background-size: @img-flags-width auto;
}
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 2dppx),

View file

@ -137,8 +137,8 @@
@import "sprites/iconsbig@1x";
@import "sprites/iconssmall@2x";
@import "sprites/iconsbig@2x";
//@import "sprites/iconssmall@1.5x";
//@import "sprites/iconsbig@1.5x";
@import "sprites/iconssmall@1.5x";
@import "sprites/iconsbig@1.5x";
.font-size-small {
.fontsize(@font-size-small);

View file

@ -132,8 +132,8 @@
@import "sprites/iconsbig@1x";
@import "sprites/iconssmall@2x";
@import "sprites/iconsbig@2x";
//@import "sprites/iconssmall@1.5x";
//@import "sprites/iconsbig@1.5x";
@import "sprites/iconssmall@1.5x";
@import "sprites/iconsbig@1.5x";
.font-size-small {
.fontsize(@font-size-small);

View file

@ -135,8 +135,8 @@
@import "sprites/iconsbig@1x";
@import "sprites/iconssmall@2x";
@import "sprites/iconsbig@2x";
//@import "sprites/iconssmall@1.5x";
//@import "sprites/iconsbig@1.5x";
@import "sprites/iconssmall@1.5x";
@import "sprites/iconsbig@1.5x";
.font-size-small {
.fontsize(@font-size-small);