[all] unlocked adapt to 150% system scaling
This commit is contained in:
parent
53948517ac
commit
89f733ae30
|
@ -120,7 +120,7 @@ Common.Utils = _.extend(new(function() {
|
||||||
me = this,
|
me = this,
|
||||||
checkSize = function() {
|
checkSize = function() {
|
||||||
me.zoom = 1;
|
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;
|
// считаем: 0 < window.devicePixelRatio < 2 => _devicePixelRatio = 1; zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||||
// считаем: window.devicePixelRatio >= 2 => _devicePixelRatio = 2; 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)
|
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
|
||||||
//document.firstElementChild.style.zoom = "reset";
|
//document.firstElementChild.style.zoom = "reset";
|
||||||
document.firstElementChild.style.zoom = 1.0 / me.zoom; }
|
document.firstElementChild.style.zoom = 1.0 / me.zoom;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
document.firstElementChild.style.zoom = "normal";
|
document.firstElementChild.style.zoom = "normal";
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,13 +180,13 @@
|
||||||
@2ximage: replace(@imagepath, '\.png$', '@2x.png');
|
@2ximage: replace(@imagepath, '\.png$', '@2x.png');
|
||||||
|
|
||||||
@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),
|
||||||
// (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
|
(min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
|
||||||
// (min-resolution: 144dpi) and (max-resolution: 191dpi)
|
(min-resolution: 144dpi) and (max-resolution: 191dpi)
|
||||||
// {
|
{
|
||||||
// background-image: ~"url(@{1d5ximage})";
|
background-image: ~"url(@{1d5ximage})";
|
||||||
// background-size: @w @h;
|
background-size: @w @h;
|
||||||
// }
|
}
|
||||||
|
|
||||||
@media (-webkit-min-device-pixel-ratio: 2),
|
@media (-webkit-min-device-pixel-ratio: 2),
|
||||||
(min-resolution: 2dppx),
|
(min-resolution: 2dppx),
|
||||||
|
@ -210,13 +210,13 @@
|
||||||
@2ximage: replace(@common-controls, '\.png$', '@2x.png');
|
@2ximage: replace(@common-controls, '\.png$', '@2x.png');
|
||||||
|
|
||||||
@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),
|
||||||
// (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
|
(min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
|
||||||
// (min-resolution: 144dpi) and (max-resolution: 191dpi)
|
(min-resolution: 144dpi) and (max-resolution: 191dpi)
|
||||||
//{
|
{
|
||||||
// background-image: ~"url(@{common-image-const-path}/@{1d5ximage})";
|
background-image: ~"url(@{common-image-const-path}/@{1d5ximage})";
|
||||||
// background-size: @common-controls-width auto;
|
background-size: @common-controls-width auto;
|
||||||
//}
|
}
|
||||||
|
|
||||||
@media (-webkit-min-device-pixel-ratio: 2),
|
@media (-webkit-min-device-pixel-ratio: 2),
|
||||||
(min-resolution: 2dppx),
|
(min-resolution: 2dppx),
|
||||||
|
@ -235,13 +235,13 @@
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
@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),
|
||||||
// (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
|
(min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
|
||||||
// (min-resolution: 144dpi) and (max-resolution: 191dpi)
|
(min-resolution: 144dpi) and (max-resolution: 191dpi)
|
||||||
//{
|
{
|
||||||
// background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker@1.5x.png)";
|
background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker@1.5x.png)";
|
||||||
// background-size: @img-colorpicker-width auto;
|
background-size: @img-colorpicker-width auto;
|
||||||
//}
|
}
|
||||||
|
|
||||||
@media (-webkit-min-device-pixel-ratio: 2),
|
@media (-webkit-min-device-pixel-ratio: 2),
|
||||||
(min-resolution: 2dppx),
|
(min-resolution: 2dppx),
|
||||||
|
@ -263,13 +263,13 @@
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
@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),
|
||||||
// (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
|
(min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
|
||||||
// (min-resolution: 144dpi) and (max-resolution: 191dpi)
|
(min-resolution: 144dpi) and (max-resolution: 191dpi)
|
||||||
//{
|
{
|
||||||
// background-image: ~"url(@{common-image-const-path}/controls/flags@1.5x.png)";
|
background-image: ~"url(@{common-image-const-path}/controls/flags@1.5x.png)";
|
||||||
// background-size: @img-flags-width auto;
|
background-size: @img-flags-width auto;
|
||||||
//}
|
}
|
||||||
|
|
||||||
@media (-webkit-min-device-pixel-ratio: 2),
|
@media (-webkit-min-device-pixel-ratio: 2),
|
||||||
(min-resolution: 2dppx),
|
(min-resolution: 2dppx),
|
||||||
|
|
|
@ -137,8 +137,8 @@
|
||||||
@import "sprites/iconsbig@1x";
|
@import "sprites/iconsbig@1x";
|
||||||
@import "sprites/iconssmall@2x";
|
@import "sprites/iconssmall@2x";
|
||||||
@import "sprites/iconsbig@2x";
|
@import "sprites/iconsbig@2x";
|
||||||
//@import "sprites/iconssmall@1.5x";
|
@import "sprites/iconssmall@1.5x";
|
||||||
//@import "sprites/iconsbig@1.5x";
|
@import "sprites/iconsbig@1.5x";
|
||||||
|
|
||||||
.font-size-small {
|
.font-size-small {
|
||||||
.fontsize(@font-size-small);
|
.fontsize(@font-size-small);
|
||||||
|
|
|
@ -132,8 +132,8 @@
|
||||||
@import "sprites/iconsbig@1x";
|
@import "sprites/iconsbig@1x";
|
||||||
@import "sprites/iconssmall@2x";
|
@import "sprites/iconssmall@2x";
|
||||||
@import "sprites/iconsbig@2x";
|
@import "sprites/iconsbig@2x";
|
||||||
//@import "sprites/iconssmall@1.5x";
|
@import "sprites/iconssmall@1.5x";
|
||||||
//@import "sprites/iconsbig@1.5x";
|
@import "sprites/iconsbig@1.5x";
|
||||||
|
|
||||||
.font-size-small {
|
.font-size-small {
|
||||||
.fontsize(@font-size-small);
|
.fontsize(@font-size-small);
|
||||||
|
|
|
@ -135,8 +135,8 @@
|
||||||
@import "sprites/iconsbig@1x";
|
@import "sprites/iconsbig@1x";
|
||||||
@import "sprites/iconssmall@2x";
|
@import "sprites/iconssmall@2x";
|
||||||
@import "sprites/iconsbig@2x";
|
@import "sprites/iconsbig@2x";
|
||||||
//@import "sprites/iconssmall@1.5x";
|
@import "sprites/iconssmall@1.5x";
|
||||||
//@import "sprites/iconsbig@1.5x";
|
@import "sprites/iconsbig@1.5x";
|
||||||
|
|
||||||
.font-size-small {
|
.font-size-small {
|
||||||
.fontsize(@font-size-small);
|
.fontsize(@font-size-small);
|
||||||
|
|
Loading…
Reference in a new issue