Merge pull request #872 from ONLYOFFICE/feature/pr28-fix-bug-50327

[all] fix bug 50327, 50328, 50329
This commit is contained in:
maxkadushkin 2021-05-10 23:08:45 +03:00 committed by GitHub
commit 969e476f45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 38 additions and 25 deletions

View file

@ -4,7 +4,7 @@
(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)
{ {
.x-huge .toolbar__icon { .x-huge .toolbar__icon, .toolbar__icon.toolbar__icon-big {
background-image: url(resources/{{{escaped_image}}}); background-image: url(resources/{{{escaped_image}}});
background-size: {{scaled width 1.5}}px auto; background-size: {{scaled width 1.5}}px auto;
} }

View file

@ -1,6 +1,14 @@
{{#spritesheet}} {{#spritesheet}}
.options__icon.options__icon-huge { @media only screen {
background-size: 80px auto; @media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
background-size: var(--huge-icon-background-image-width) auto; (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}} {{/spritesheet}}

View file

@ -20,12 +20,9 @@
} }
} }
} }
.x-huge .toolbar__icon { .x-huge .toolbar__icon, .toolbar__icon.toolbar__icon-big {
background-image: url(resources/{{{escaped_image}}}); background-image: url(resources/{{{escaped_image}}});
} }
.toolbar__icon.toolbar__icon-big {
background-image: var(--big-icon-background-image);
}
{{/spritesheet}} {{/spritesheet}}
{{#sprites}} {{#sprites}}
{{#parselang name}}.x-huge .{{name}}{{/parselang}}, {{#parselang name}}.x-huge .{{name}}{{/parselang}},

View file

@ -17,7 +17,7 @@
} }
.options__icon.options__icon-huge { .options__icon.options__icon-huge {
background-image: var(--huge-icon-background-image); background-image: url(resources/{{{escaped_image}}});
} }
{{/spritesheet}} {{/spritesheet}}
{{#sprites}} {{#sprites}}

View file

@ -3,7 +3,7 @@
@media (-webkit-min-device-pixel-ratio: 2), @media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 2dppx), (min-resolution: 192dpi) (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-image: url(resources/{{{escaped_image}}});
background-size: {{half width}}px auto; background-size: {{half width}}px auto;
} }

View file

@ -1,5 +1,12 @@
{{#spritesheet}} {{#spritesheet}}
.options__icon.options__icon-huge { @media only screen {
background-size: var(--huge-icon-background-image-width) auto; @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}} {{/spritesheet}}

View file

@ -144,37 +144,38 @@
@import "sprites/iconssmall@1.5x"; @import "sprites/iconssmall@1.5x";
@import "sprites/iconsbig@1.5x"; @import "sprites/iconsbig@1.5x";
@import "sprites/iconshuge@1.5x"; @import "sprites/iconshuge@1.5x";
@import "sprites/iconshuge@2x";
:root { :root {
--big-icon-background-image: ~"url(@{app-image-const-path}/iconsbig.png)"; //--big-icon-background-image: ~"url(@{app-image-const-path}/iconsbig.png)";
--huge-icon-background-image: ~"url(@{app-image-const-path}/iconshuge.png)"; //--huge-icon-background-image: ~"url(@{app-image-const-path}/iconshuge.png)";
--big-icon-background-image-width: 56px; --big-icon-background-image-width: 56px;
--huge-icon-background-image-width: 80px; --huge-icon-background-image-width: 80px;
@safari-fix-base-path: "resources/img"; //@safari-fix-base-path: "resources/img";
.safari { .safari {
--big-icon-background-image: ~"url(@{safari-fix-base-path}/iconsbig.png)"; //--big-icon-background-image: ~"url(@{safari-fix-base-path}/iconsbig.png)";
--huge-icon-background-image: ~"url(@{safari-fix-base-path}/iconshuge.png)"; //--huge-icon-background-image: ~"url(@{safari-fix-base-path}/iconshuge.png)";
} }
.pixel-ratio__1_5 { .pixel-ratio__1_5 {
--big-icon-background-image: ~"url(@{app-image-const-path}/iconsbig@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)"; //--huge-icon-background-image: ~"url(@{app-image-const-path}/iconshuge@1.5x.png)";
&.safari { &.safari {
--big-icon-background-image: ~"url(@{safari-fix-base-path}/iconsbig@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)"; //--huge-icon-background-image: ~"url(@{safari-fix-base-path}/iconshuge@1.5x.png)";
} }
} }
.pixel-ratio__2 { .pixel-ratio__2 {
--big-icon-background-image: ~"url(@{app-image-const-path}/iconsbig@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)"; //--huge-icon-background-image: ~"url(@{app-image-const-path}/iconshuge@2x.png)";
&.safari { &.safari {
--big-icon-background-image: ~"url(@{safari-fix-base-path}/iconsbig@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)"; //--huge-icon-background-image: ~"url(@{safari-fix-base-path}/iconshuge@2x.png)";
} }
} }