From 4dccf5a7ddca0ef06b86b29d49e6f087d61b9f22 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Tue, 14 Sep 2021 17:56:08 +0300 Subject: [PATCH] Correct highlight color palette --- .../lib/component/HighlightColorPalette.jsx | 2 +- .../mobile/src/view/edit/EditText.jsx | 22 +++++++------------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/apps/common/mobile/lib/component/HighlightColorPalette.jsx b/apps/common/mobile/lib/component/HighlightColorPalette.jsx index 86ca4db01..5057895be 100644 --- a/apps/common/mobile/lib/component/HighlightColorPalette.jsx +++ b/apps/common/mobile/lib/component/HighlightColorPalette.jsx @@ -24,7 +24,7 @@ const HighlightColorPalette = ({changeColor, curColor}) => { ))} - + changeColor('transparent')} title={t('Edit.textNoFill')}> ) }; diff --git a/apps/documenteditor/mobile/src/view/edit/EditText.jsx b/apps/documenteditor/mobile/src/view/edit/EditText.jsx index b0995a6f8..147bbcda0 100644 --- a/apps/documenteditor/mobile/src/view/edit/EditText.jsx +++ b/apps/documenteditor/mobile/src/view/edit/EditText.jsx @@ -466,7 +466,7 @@ const PageBackgroundColor = props => { const { t } = useTranslation(); const _t = t('Edit', {returnObjects: true}); const backgroundColor = props.storeTextSettings.backgroundColor; - // const customColors = props.storePalette.customColors; + const changeColor = (color, effectId) => { if (color !== 'empty') { if (effectId !== undefined ) { @@ -475,12 +475,9 @@ const PageBackgroundColor = props => { props.onBackgroundColor(color); } } - // } else { - // // open custom color menu - // props.f7router.navigate('/edit-text-custom-back-color/', {props: {onBackgroundColor: props.onBackgroundColor}}); - // } }; - return( + + return ( {Device.phone && @@ -492,12 +489,6 @@ const PageBackgroundColor = props => { } - {/* - - - */} ) }; @@ -534,6 +525,10 @@ const EditText = props => { : ; + const backgroundColorPreview = backgroundColor !== 'transparent' ? + : + ; + return ( @@ -562,8 +557,7 @@ const EditText = props => { onBackgroundColor: props.onBackgroundColor }}> {!isAndroid ? - : - + {backgroundColorPreview} : backgroundColorPreview }