TF-1184 improve UI UX of ToolbarRichText in web
This commit is contained in:
@@ -64,7 +64,9 @@ class ComposerView extends GetWidget<ComposerController>
|
|||||||
Expanded(child: Column(
|
Expanded(child: Column(
|
||||||
children: [
|
children: [
|
||||||
_buildAttachmentsWidget(context),
|
_buildAttachmentsWidget(context),
|
||||||
ToolbarRichTextWebBuilder(richTextWebController: controller.richTextWebController),
|
ToolbarRichTextWebBuilder(
|
||||||
|
richTextWebController: controller.richTextWebController,
|
||||||
|
padding: const EdgeInsets.only(left: 20, top: 8, bottom: 8)),
|
||||||
buildInlineLoadingView(controller),
|
buildInlineLoadingView(controller),
|
||||||
_buildEditorForm(context)
|
_buildEditorForm(context)
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -21,10 +21,12 @@ class ToolbarRichTextWebBuilder extends StatelessWidget with RichTextButtonMixin
|
|||||||
|
|
||||||
final RichTextWebController richTextWebController;
|
final RichTextWebController richTextWebController;
|
||||||
final ImagePaths _imagePaths = Get.find<ImagePaths>();
|
final ImagePaths _imagePaths = Get.find<ImagePaths>();
|
||||||
|
final EdgeInsetsGeometry? padding;
|
||||||
|
|
||||||
ToolbarRichTextWebBuilder({
|
ToolbarRichTextWebBuilder({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.richTextWebController
|
required this.richTextWebController,
|
||||||
|
this.padding,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -34,7 +36,7 @@ class ToolbarRichTextWebBuilder extends StatelessWidget with RichTextButtonMixin
|
|||||||
final opacity = codeViewEnabled ? 0.5 : 1.0;
|
final opacity = codeViewEnabled ? 0.5 : 1.0;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.only(left: 20, top: 8, bottom: 8),
|
padding: padding,
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
crossAxisAlignment: WrapCrossAlignment.center,
|
crossAxisAlignment: WrapCrossAlignment.center,
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController> {
|
|||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(16))),
|
borderRadius: BorderRadius.all(Radius.circular(16))),
|
||||||
width: max(_responsiveUtils.getSizeScreenWidth(context) * 0.4, 600),
|
width: max(_responsiveUtils.getSizeScreenWidth(context) * 0.4, 650),
|
||||||
height: _responsiveUtils.getSizeScreenHeight(context) * 0.75,
|
height: _responsiveUtils.getSizeScreenHeight(context) * 0.75,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
||||||
@@ -251,7 +251,6 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController> {
|
|||||||
border: Border.all(color: AppColor.colorInputBorderCreateMailbox),
|
border: Border.all(color: AppColor.colorInputBorderCreateMailbox),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 16),
|
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
if (controller.signatureType.value == SignatureType.plainText)
|
if (controller.signatureType.value == SignatureType.plainText)
|
||||||
@@ -429,7 +428,9 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
if(BuildUtils.isWeb)
|
if(BuildUtils.isWeb)
|
||||||
ToolbarRichTextWebBuilder(richTextWebController: controller.richTextWebController),
|
ToolbarRichTextWebBuilder(
|
||||||
|
richTextWebController: controller.richTextWebController,
|
||||||
|
padding: const EdgeInsets.only(top: 22, bottom: 8.0, left: 24, right: 12)),
|
||||||
htmlEditor,
|
htmlEditor,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -440,8 +441,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController> {
|
|||||||
log('IdentityCreatorView::_buildHtmlEditorWeb(): initContent: $initContent');
|
log('IdentityCreatorView::_buildHtmlEditorWeb(): initContent: $initContent');
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: const EdgeInsets.only(left: 14.0, right: 2.0),
|
||||||
horizontal: _responsiveUtils.isMobile(context) ? 8 : 10),
|
|
||||||
child: html_editor_browser.HtmlEditor(
|
child: html_editor_browser.HtmlEditor(
|
||||||
key: const Key('identity_create_editor_web'),
|
key: const Key('identity_create_editor_web'),
|
||||||
controller: controller.richTextWebController.editorController,
|
controller: controller.richTextWebController.editorController,
|
||||||
@@ -478,8 +478,8 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController> {
|
|||||||
log('IdentityCreatorView::_buildHtmlEditorWeb(): onChangeCodeView : $contentChanged');
|
log('IdentityCreatorView::_buildHtmlEditorWeb(): onChangeCodeView : $contentChanged');
|
||||||
controller.updateContentHtmlEditor(contentChanged);
|
controller.updateContentHtmlEditor(contentChanged);
|
||||||
}),
|
}),
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user