From 79cc895ea727a43c868e91be05eea74049fc7fb2 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 28 Apr 2021 16:35:35 +0300 Subject: [PATCH] [DE PE mobile] Correct text settings and styles --- apps/common/mobile/resources/less/common.less | 34 +++++++++---------- .../mobile/src/store/textSettings.js | 7 +++- .../mobile/src/view/edit/EditText.jsx | 5 ++- .../mobile/src/less/icons-material.less | 5 +++ .../mobile/src/less/icons-material.less | 5 +++ 5 files changed, 36 insertions(+), 20 deletions(-) diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less index 0878be6caf..51ddd56ca7 100644 --- a/apps/common/mobile/resources/less/common.less +++ b/apps/common/mobile/resources/less/common.less @@ -133,13 +133,6 @@ } } -.dialog { - z-index: 13700; - .content-block { - padding: 0; - } -} - .about { .content-block { margin: 0 auto 15px; @@ -751,23 +744,28 @@ input[type="number"]::-webkit-inner-spin-button { } } - -.picker-3d { - .picker-item { +.dlg-adv-options { + z-index: 13700; + .content-block { padding: 0; - text-align: left; - font-size: 16px; - span { + } + .picker-3d { + .picker-item { padding: 0; + text-align: left; + font-size: 16px; + span { + padding: 0; + } } } + .picker-center-highlight { + width: 100%; + left: 0; + right: 0; + } } -.picker-center-highlight { - width: 100%; - left: 0; - right: 0; -} diff --git a/apps/documenteditor/mobile/src/store/textSettings.js b/apps/documenteditor/mobile/src/store/textSettings.js index 9c794163c1..44fd4cd437 100644 --- a/apps/documenteditor/mobile/src/store/textSettings.js +++ b/apps/documenteditor/mobile/src/store/textSettings.js @@ -36,7 +36,8 @@ export class storeTextSettings { resetTextColor: action, changeCustomTextColors: action, resetLineSpacing: action, - resetBackgroundColor: action + resetBackgroundColor: action, + changeFontFamily: action }); } @@ -156,6 +157,10 @@ export class storeTextSettings { this.customTextColors = colors; } + changeFontFamily(name) { + this.fontName = name; + } + resetLineSpacing (vc) { let line = (vc.get_Line() === null || vc.get_LineRule() === null || vc.get_LineRule() != 1) ? -1 : vc.get_Line(); this.lineSpacing = line; diff --git a/apps/documenteditor/mobile/src/view/edit/EditText.jsx b/apps/documenteditor/mobile/src/view/edit/EditText.jsx index 5e68101828..3cad9d774d 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditText.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditText.jsx @@ -28,6 +28,9 @@ const PageFonts = props => { }} }); }; + + console.log(curFontName); + return ( @@ -60,7 +63,7 @@ const PageFonts = props => { checked={curFontName === item.name} title={item.name} style={{fontFamily: `${item.name}`}} - onClick={() => {props.changeFontFamily(item.name)}} + onClick={() => {storeTextSettings.changeFontFamily(item.name); props.changeFontFamily(item.name)}} > ))} diff --git a/apps/presentationeditor/mobile/src/less/icons-material.less b/apps/presentationeditor/mobile/src/less/icons-material.less index 02c63cd81b..c08714cd28 100644 --- a/apps/presentationeditor/mobile/src/less/icons-material.less +++ b/apps/presentationeditor/mobile/src/less/icons-material.less @@ -476,6 +476,11 @@ height: 24px; .encoded-svg-background(''); } + &.icon-plus { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } } // Overwrite color for toolbar diff --git a/apps/spreadsheeteditor/mobile/src/less/icons-material.less b/apps/spreadsheeteditor/mobile/src/less/icons-material.less index ff2f19cdf4..5582d00e6e 100644 --- a/apps/spreadsheeteditor/mobile/src/less/icons-material.less +++ b/apps/spreadsheeteditor/mobile/src/less/icons-material.less @@ -391,6 +391,11 @@ height: 24px; .encoded-svg-background(''); } + &.icon-plus { + width: 22px; + height: 22px; + .encoded-svg-background(''); + } } // Overwrite color for toolbar