Skip to content

Commit

Permalink
fix(text-editor): remove duplicate text-shadow from invisible text-field
Browse files Browse the repository at this point in the history
- Fixed issue where text-shadow was displayed twice from an invisible text-field
- This resolves issue [#131](#131)
  • Loading branch information
hm21 committed Jun 22, 2024
1 parent d4d2e63 commit 74982d6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Version 4.0.10
- **feat(text-editor)**: Add autocorrect and enableSuggestions configs. This was requsted in [#132](https://github.com/hm21/pro_image_editor/issues/132)
- **fix(text-editor)**: Remove duplicate text-shadow from invisible text-field. This resolves issue [#131](https://github.com/hm21/pro_image_editor/issue/131).

## Version 4.0.9
- **fix(emoji-picker)**: Ensure the emoji-picker is rendered inside the safe areas. This resolves issue [#126](https://github.com/hm21/pro_image_editor/issue/126).
Expand Down
10 changes: 6 additions & 4 deletions example/lib/pages/reorder_layer_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class _ReorderLayerExampleState extends State<ReorderLayerExample>
onCloseEditor: onCloseEditor,
),
configs: ProImageEditorConfigs(
designMode: platformDesignMode,
customWidgets:
ImageEditorCustomWidgets(mainEditor: CustomWidgetsMainEditor(
designMode: platformDesignMode,
customWidgets: ImageEditorCustomWidgets(
mainEditor: CustomWidgetsMainEditor(
bodyItems: (editor, rebuildStream) {
return [
ReactiveCustomWidget(
Expand Down Expand Up @@ -97,7 +97,9 @@ class _ReorderLayerExampleState extends State<ReorderLayerExample>
),
];
},
))),
),
),
),
);
}
}
Expand Down
25 changes: 14 additions & 11 deletions lib/modules/text_editor/text_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -640,23 +640,26 @@ class TextEditorState extends State<TextEditor>
cursorHeight: _getTextFontSize * 1.2,
scrollPhysics: const NeverScrollableScrollPhysics(),
decoration: InputDecoration(
border: InputBorder.none,
contentPadding: EdgeInsets.fromLTRB(
12, _numLines <= 1 ? 4 : 0, 12, 0),
hintText: _textCtrl.text.isEmpty
? i18n.textEditor.inputHintText
: '',
hintStyle: selectedTextStyle.copyWith(
color: imageEditorTheme.textEditor.inputHintColor,
fontSize: _getTextFontSize,
height: 1.35,
)),
border: InputBorder.none,
contentPadding: EdgeInsets.fromLTRB(
12, _numLines <= 1 ? 4 : 0, 12, 0),
hintText: _textCtrl.text.isEmpty
? i18n.textEditor.inputHintText
: '',
hintStyle: selectedTextStyle.copyWith(
color: imageEditorTheme.textEditor.inputHintColor,
fontSize: _getTextFontSize,
height: 1.35,
shadows: [],
),
),
style: selectedTextStyle.copyWith(
color: Colors.transparent,
fontSize: _getTextFontSize,
height: 1.35,
letterSpacing: 0,
decoration: TextDecoration.none,
shadows: [],
),
autofocus: true,
),
Expand Down

0 comments on commit 74982d6

Please sign in to comment.