From cd588618e64344a29c71a91f61d520686bc5aec4 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Mon, 10 May 2021 22:38:13 +0300 Subject: [PATCH] [all] fix bug 50327, 50328, 50329 --- .../img/toolbar/1.5x/big/.css.handlebars | 2 +- .../img/toolbar/1.5x/huge/.css.handlebars | 14 +++++++--- .../img/toolbar/1x/big/.css.handlebars | 5 +--- .../img/toolbar/1x/huge/.css.handlebars | 2 +- .../img/toolbar/2x/big/.css.handlebars | 2 +- .../img/toolbar/2x/huge/.css.handlebars | 11 ++++++-- .../main/resources/less/app.less | 27 ++++++++++--------- 7 files changed, 38 insertions(+), 25 deletions(-) diff --git a/apps/common/main/resources/img/toolbar/1.5x/big/.css.handlebars b/apps/common/main/resources/img/toolbar/1.5x/big/.css.handlebars index 4d81da70c..86f13ac82 100644 --- a/apps/common/main/resources/img/toolbar/1.5x/big/.css.handlebars +++ b/apps/common/main/resources/img/toolbar/1.5x/big/.css.handlebars @@ -4,7 +4,7 @@ (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx), (min-resolution: 144dpi) and (max-resolution: 191dpi) { - .x-huge .toolbar__icon { + .x-huge .toolbar__icon, .toolbar__icon.toolbar__icon-big { background-image: url(resources/{{{escaped_image}}}); background-size: {{scaled width 1.5}}px auto; } diff --git a/apps/common/main/resources/img/toolbar/1.5x/huge/.css.handlebars b/apps/common/main/resources/img/toolbar/1.5x/huge/.css.handlebars index ddb2130e0..fa7e149e8 100644 --- a/apps/common/main/resources/img/toolbar/1.5x/huge/.css.handlebars +++ b/apps/common/main/resources/img/toolbar/1.5x/huge/.css.handlebars @@ -1,6 +1,14 @@ {{#spritesheet}} -.options__icon.options__icon-huge { - background-size: 80px auto; - background-size: var(--huge-icon-background-image-width) auto; +@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) + { + .options__icon.options__icon-huge { + background-image: url(resources/{{{escaped_image}}}); + background-size: 80px auto; + background-size: var(--huge-icon-background-image-width) auto; + } + } } {{/spritesheet}} diff --git a/apps/common/main/resources/img/toolbar/1x/big/.css.handlebars b/apps/common/main/resources/img/toolbar/1x/big/.css.handlebars index cb248958a..c97af05b1 100644 --- a/apps/common/main/resources/img/toolbar/1x/big/.css.handlebars +++ b/apps/common/main/resources/img/toolbar/1x/big/.css.handlebars @@ -20,12 +20,9 @@ } } } -.x-huge .toolbar__icon { +.x-huge .toolbar__icon, .toolbar__icon.toolbar__icon-big { background-image: url(resources/{{{escaped_image}}}); } -.toolbar__icon.toolbar__icon-big { - background-image: var(--big-icon-background-image); -} {{/spritesheet}} {{#sprites}} {{#parselang name}}.x-huge .{{name}}{{/parselang}}, diff --git a/apps/common/main/resources/img/toolbar/1x/huge/.css.handlebars b/apps/common/main/resources/img/toolbar/1x/huge/.css.handlebars index 098d16ed0..a516dc0e9 100644 --- a/apps/common/main/resources/img/toolbar/1x/huge/.css.handlebars +++ b/apps/common/main/resources/img/toolbar/1x/huge/.css.handlebars @@ -17,7 +17,7 @@ } .options__icon.options__icon-huge { - background-image: var(--huge-icon-background-image); + background-image: url(resources/{{{escaped_image}}}); } {{/spritesheet}} {{#sprites}} diff --git a/apps/common/main/resources/img/toolbar/2x/big/.css.handlebars b/apps/common/main/resources/img/toolbar/2x/big/.css.handlebars index 382ce91c8..77dd44477 100644 --- a/apps/common/main/resources/img/toolbar/2x/big/.css.handlebars +++ b/apps/common/main/resources/img/toolbar/2x/big/.css.handlebars @@ -3,7 +3,7 @@ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx), (min-resolution: 192dpi) { - .x-huge .toolbar__icon { + .x-huge .toolbar__icon, .toolbar__icon.toolbar__icon-big { background-image: url(resources/{{{escaped_image}}}); background-size: {{half width}}px auto; } diff --git a/apps/common/main/resources/img/toolbar/2x/huge/.css.handlebars b/apps/common/main/resources/img/toolbar/2x/huge/.css.handlebars index 1bb31ab87..8ebef7651 100644 --- a/apps/common/main/resources/img/toolbar/2x/huge/.css.handlebars +++ b/apps/common/main/resources/img/toolbar/2x/huge/.css.handlebars @@ -1,5 +1,12 @@ {{#spritesheet}} -.options__icon.options__icon-huge { - background-size: var(--huge-icon-background-image-width) auto; +@media only screen { + @media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 2dppx), (min-resolution: 192dpi) + { + .options__icon.options__icon-huge { + background-image: url(resources/{{{escaped_image}}}); + background-size: var(--huge-icon-background-image-width) auto; + } + } } {{/spritesheet}} diff --git a/apps/documenteditor/main/resources/less/app.less b/apps/documenteditor/main/resources/less/app.less index d7a520360..cc1866a52 100644 --- a/apps/documenteditor/main/resources/less/app.less +++ b/apps/documenteditor/main/resources/less/app.less @@ -144,37 +144,38 @@ @import "sprites/iconssmall@1.5x"; @import "sprites/iconsbig@1.5x"; @import "sprites/iconshuge@1.5x"; +@import "sprites/iconshuge@2x"; :root { - --big-icon-background-image: ~"url(@{app-image-const-path}/iconsbig.png)"; - --huge-icon-background-image: ~"url(@{app-image-const-path}/iconshuge.png)"; + //--big-icon-background-image: ~"url(@{app-image-const-path}/iconsbig.png)"; + //--huge-icon-background-image: ~"url(@{app-image-const-path}/iconshuge.png)"; --big-icon-background-image-width: 56px; --huge-icon-background-image-width: 80px; - @safari-fix-base-path: "resources/img"; + //@safari-fix-base-path: "resources/img"; .safari { - --big-icon-background-image: ~"url(@{safari-fix-base-path}/iconsbig.png)"; - --huge-icon-background-image: ~"url(@{safari-fix-base-path}/iconshuge.png)"; + //--big-icon-background-image: ~"url(@{safari-fix-base-path}/iconsbig.png)"; + //--huge-icon-background-image: ~"url(@{safari-fix-base-path}/iconshuge.png)"; } .pixel-ratio__1_5 { - --big-icon-background-image: ~"url(@{app-image-const-path}/iconsbig@1.5x.png)"; - --huge-icon-background-image: ~"url(@{app-image-const-path}/iconshuge@1.5x.png)"; + //--big-icon-background-image: ~"url(@{app-image-const-path}/iconsbig@1.5x.png)"; + //--huge-icon-background-image: ~"url(@{app-image-const-path}/iconshuge@1.5x.png)"; &.safari { - --big-icon-background-image: ~"url(@{safari-fix-base-path}/iconsbig@1.5x.png)"; - --huge-icon-background-image: ~"url(@{safari-fix-base-path}/iconshuge@1.5x.png)"; + //--big-icon-background-image: ~"url(@{safari-fix-base-path}/iconsbig@1.5x.png)"; + //--huge-icon-background-image: ~"url(@{safari-fix-base-path}/iconshuge@1.5x.png)"; } } .pixel-ratio__2 { - --big-icon-background-image: ~"url(@{app-image-const-path}/iconsbig@2x.png)"; - --huge-icon-background-image: ~"url(@{app-image-const-path}/iconshuge@2x.png)"; + //--big-icon-background-image: ~"url(@{app-image-const-path}/iconsbig@2x.png)"; + //--huge-icon-background-image: ~"url(@{app-image-const-path}/iconshuge@2x.png)"; &.safari { - --big-icon-background-image: ~"url(@{safari-fix-base-path}/iconsbig@2x.png)"; - --huge-icon-background-image: ~"url(@{safari-fix-base-path}/iconshuge@2x.png)"; + //--big-icon-background-image: ~"url(@{safari-fix-base-path}/iconsbig@2x.png)"; + //--huge-icon-background-image: ~"url(@{safari-fix-base-path}/iconshuge@2x.png)"; } }