From bb8d5eeb8c23b89db2d3518b9e2ba62a9023bc69 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 15 Mar 2019 16:22:27 +0300 Subject: [PATCH] [sailfish] changed styles. svg mask in stylesheet doesn't work --- .../less/material/_sailfish_fix.less | 41 ++++++++++ .../mobile/app/controller/Editor.js | 6 +- apps/documenteditor/mobile/index.html | 12 +++ .../mobile/resources/css/app-material.css | 82 +++++++++++++++++++ .../mobile/resources/less/app-material.less | 1 + 5 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 apps/common/mobile/resources/less/material/_sailfish_fix.less diff --git a/apps/common/mobile/resources/less/material/_sailfish_fix.less b/apps/common/mobile/resources/less/material/_sailfish_fix.less new file mode 100644 index 000000000..83cf4c080 --- /dev/null +++ b/apps/common/mobile/resources/less/material/_sailfish_fix.less @@ -0,0 +1,41 @@ + +.icon-redefine (@name; @svgres) { + i.icon { + &.@{name} { + background-color: transparent; + -webkit-mask-image: none; + .encoded-svg-background(@svgres); + + .button.active & { + background-color: transparent; + } + } + } +} + +.sailfish { + .icon-redefine(icon-text-align-center, ''); + .icon-redefine(icon-text-align-jast, ''); + .icon-redefine(icon-text-align-left, ''); + .icon-redefine(icon-text-align-right, ''); + .icon-redefine(icon-de-indent, ''); + .icon-redefine(icon-in-indent, ''); + .icon-redefine(icon-block-align-left, ''); + .icon-redefine(icon-block-align-center, ''); + .icon-redefine(icon-block-align-right, ''); + + .item-content.buttons .item-inner > .row .button.active { + background-color: #a2bdde; + } +} + +.dataview.shapes { + .thumb { + -webkit-mask-image: none !important; + } + + [data-type=textRect] .thumb { + background-image: url('../img/shapes/shape-01.svg'); + background-color: transparent; + } +} \ No newline at end of file diff --git a/apps/documenteditor/mobile/app/controller/Editor.js b/apps/documenteditor/mobile/app/controller/Editor.js index b968233bf..a48c17dbc 100644 --- a/apps/documenteditor/mobile/app/controller/Editor.js +++ b/apps/documenteditor/mobile/app/controller/Editor.js @@ -98,9 +98,13 @@ define([ var phone = isPhone(); // console.debug('Layout profile:', phone ? 'Phone' : 'Tablet'); + if ( isSailfish() ) { + Common.SharedSettings.set('sailfish', true); + $('html').addClass('sailfish'); + } + Common.SharedSettings.set('android', Framework7.prototype.device.android); Common.SharedSettings.set('phone', phone); - Common.SharedSettings.set('sailfish', isSailfish()); $('html').addClass(phone ? 'phone' : 'tablet'); diff --git a/apps/documenteditor/mobile/index.html b/apps/documenteditor/mobile/index.html index adca9ea79..795c25dcb 100644 --- a/apps/documenteditor/mobile/index.html +++ b/apps/documenteditor/mobile/index.html @@ -246,6 +246,18 @@