TF-759 Apply new design for code_view button in composer web
This commit is contained in:
@@ -529,6 +529,20 @@ class ComposerView extends GetWidget<ComposerController>
|
||||
maxWithEditor: constraints.maxWidth - 120)),
|
||||
);
|
||||
}),
|
||||
const SizedBox(width: 4),
|
||||
Obx(() {
|
||||
return buildIconWeb(
|
||||
minSize: 40,
|
||||
colorSelected: controller.richTextWebController.codeViewEnabled
|
||||
? AppColor.colorSelectedRichTextButton
|
||||
: Colors.transparent,
|
||||
iconPadding: EdgeInsets.zero,
|
||||
icon: SvgPicture.asset(imagePaths.icStyleCodeView,
|
||||
color: AppColor.colorTextButton,
|
||||
fit: BoxFit.fill),
|
||||
tooltip: AppLocalizations.of(context).codeView,
|
||||
onTap: () => controller.richTextWebController.toggleCodeView());
|
||||
}),
|
||||
])
|
||||
)
|
||||
);
|
||||
@@ -910,17 +924,6 @@ class ComposerView extends GetWidget<ComposerController>
|
||||
tooltip: RichTextStyleType.paragraph.getTooltipButton(context))),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8),
|
||||
child: buildWrapIconStyleText(
|
||||
padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 5),
|
||||
isSelected: richTextController.isTextStyleTypeSelected(RichTextStyleType.codeView),
|
||||
icon: buildIconWithTooltip(
|
||||
path: RichTextStyleType.codeView.getIcon(imagePaths),
|
||||
color: AppColor.colorDefaultRichTextButton.withOpacity(opacity),
|
||||
tooltip: RichTextStyleType.codeView.getTooltipButton(context)),
|
||||
onTap: () => richTextController.toggleCodeView()),
|
||||
)
|
||||
]
|
||||
),
|
||||
|
||||
@@ -225,7 +225,6 @@ class RichTextWebController extends BaseRichTextController {
|
||||
final isActivated = await isActivatedCodeView;
|
||||
final newCodeViewState = isActivated ? CodeViewState.disabled : CodeViewState.enabled;
|
||||
codeViewState.value = newCodeViewState;
|
||||
_selectTextStyleType(RichTextStyleType.codeView);
|
||||
editorController.toggleCodeView();
|
||||
if (isActivated) {
|
||||
setFullScreenEditor();
|
||||
|
||||
@@ -12,8 +12,7 @@ enum RichTextStyleType {
|
||||
strikeThrough,
|
||||
textColor,
|
||||
textBackgroundColor,
|
||||
paragraph,
|
||||
codeView;
|
||||
paragraph;
|
||||
|
||||
String get commandAction {
|
||||
switch (this) {
|
||||
@@ -48,8 +47,6 @@ enum RichTextStyleType {
|
||||
return imagePaths.icStyleUnderline;
|
||||
case strikeThrough:
|
||||
return imagePaths.icStyleStrikeThrough;
|
||||
case codeView:
|
||||
return imagePaths.icStyleCodeView;
|
||||
case headerStyle:
|
||||
return imagePaths.icStyleHeader;
|
||||
case textColor:
|
||||
@@ -85,8 +82,6 @@ enum RichTextStyleType {
|
||||
return AppLocalizations.of(context).formatTextColor;
|
||||
case textBackgroundColor:
|
||||
return AppLocalizations.of(context).formatTextBackgroundColor;
|
||||
case codeView:
|
||||
return AppLocalizations.of(context).codeView;
|
||||
case headerStyle:
|
||||
return AppLocalizations.of(context).headerStyle;
|
||||
case fontName:
|
||||
|
||||
Reference in New Issue
Block a user