TF-759 Apply new design for code_view button in composer web
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.48633 13.9904C3.48633 14.1164 3.51299 14.2388 3.56631 14.3575C3.61962 14.4763 3.6996 14.5842 3.80624 14.6811L8.51039 18.9199C8.70427 19.0993 8.91754 19.1853 9.15021 19.178C9.38287 19.1708 9.57918 19.0774 9.73913 18.8981C9.89909 18.7139 9.97059 18.5055 9.95362 18.2728C9.93666 18.0402 9.83365 17.8414 9.64462 17.6766L5.58029 13.9904L9.64462 10.3041C9.83365 10.1345 9.93666 9.93333 9.95362 9.70066C9.97059 9.468 9.89909 9.262 9.73913 9.08265C9.57918 8.90331 9.38287 8.81 9.15021 8.80273C8.91754 8.79546 8.70427 8.8815 8.51039 9.06084L3.80624 13.2997C3.6996 13.3966 3.61962 13.5045 3.56631 13.6232C3.51299 13.742 3.48633 13.8644 3.48633 13.9904ZM11.9785 20.963C12.2209 21.0308 12.4426 21.0054 12.6438 20.8866C12.8449 20.7679 12.9819 20.5873 13.0546 20.345L16.6318 8.0793C16.7045 7.85148 16.6875 7.63699 16.5809 7.43584C16.4742 7.23468 16.2997 7.1026 16.0574 7.03958C15.8199 6.97173 15.6017 6.99111 15.403 7.09775C15.2043 7.20439 15.0686 7.391 14.9959 7.65759L11.4332 19.8651C11.3605 20.1172 11.3702 20.3462 11.4623 20.5522C11.5544 20.7582 11.7265 20.8951 11.9785 20.963ZM24.5132 13.9904C24.5132 13.8644 24.4878 13.742 24.4369 13.6232C24.386 13.5045 24.3072 13.3966 24.2006 13.2997L19.4964 9.06084C19.3025 8.8815 19.0905 8.79546 18.8602 8.80273C18.63 8.81 18.4325 8.90331 18.2677 9.08265C18.1029 9.262 18.029 9.468 18.0459 9.70066C18.0629 9.93333 18.1659 10.1345 18.3549 10.3041L22.4265 13.9904L18.3549 17.6766C18.1659 17.8414 18.0629 18.0402 18.0459 18.2728C18.029 18.5055 18.1029 18.7139 18.2677 18.8981C18.4325 19.0774 18.63 19.1708 18.8602 19.178C19.0905 19.1853 19.3025 19.0993 19.4964 18.9199L24.2006 14.6811C24.3072 14.5842 24.386 14.4763 24.4369 14.3575C24.4878 14.2388 24.5132 14.1164 24.5132 13.9904Z" fill="#99A2AD"/>
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.98438 17.989C5.98438 18.133 6.01484 18.2729 6.07578 18.4086C6.13671 18.5443 6.22812 18.6676 6.34999 18.7784L11.7262 23.6228C11.9477 23.8277 12.1915 23.9261 12.4574 23.9177C12.7233 23.9094 12.9476 23.8028 13.1304 23.5978C13.3132 23.3873 13.395 23.1491 13.3756 22.8832C13.3562 22.6173 13.2385 22.3902 13.0224 22.2019L8.37748 17.989L13.0224 13.7762C13.2385 13.5823 13.3562 13.3524 13.3756 13.0865C13.395 12.8206 13.3132 12.5851 13.1304 12.3802C12.9476 12.1752 12.7233 12.0686 12.4574 12.0603C12.1915 12.052 11.9477 12.1503 11.7262 12.3552L6.34999 17.1996C6.22812 17.3104 6.13671 17.4337 6.07578 17.5694C6.01484 17.7051 5.98438 17.845 5.98438 17.989ZM15.6897 25.9577C15.9667 26.0353 16.2201 26.0062 16.45 25.8705C16.6799 25.7347 16.8364 25.5284 16.9195 25.2514L21.0077 11.2335C21.0908 10.9731 21.0714 10.728 20.9496 10.4981C20.8277 10.2682 20.6283 10.1173 20.3513 10.0452C20.0798 9.96769 19.8306 9.98984 19.6034 10.1117C19.3763 10.2336 19.2212 10.4469 19.1381 10.7515L15.0665 24.703C14.9834 24.991 14.9945 25.2528 15.0998 25.4882C15.205 25.7237 15.4017 25.8801 15.6897 25.9577ZM30.0151 17.989C30.0151 17.845 29.986 17.7051 29.9278 17.5694C29.8697 17.4337 29.7797 17.3104 29.6578 17.1996L24.2816 12.3552C24.06 12.1503 23.8177 12.052 23.5546 12.0603C23.2914 12.0686 23.0657 12.1752 22.8773 12.3802C22.689 12.5851 22.6045 12.8206 22.6239 13.0865C22.6433 13.3524 22.761 13.5823 22.9771 13.7762L27.6303 17.989L22.9771 22.2019C22.761 22.3902 22.6433 22.6173 22.6239 22.8832C22.6045 23.1491 22.689 23.3873 22.8773 23.5978C23.0657 23.8028 23.2914 23.9094 23.5546 23.9177C23.8177 23.9261 24.06 23.8277 24.2816 23.6228L29.6578 18.7784C29.7797 18.6676 29.8697 18.5443 29.9278 18.4086C29.986 18.2729 30.0151 18.133 30.0151 17.989Z" fill="#007AFF"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -128,6 +128,7 @@ extension AppColor on Color {
|
||||
static const colorBackgroundStyleCode = Color(0xFFF5F5F5);
|
||||
static const colorBorderWrapIconStyleCode = Color(0xFFE4E4E4);
|
||||
static const colorBackgroundWrapIconStyleCode = Color(0xFFF2F3F5);
|
||||
static const colorSelectedRichTextButton = Color(0x99EBEDF0);
|
||||
|
||||
static const mapGradientColor = [
|
||||
[Color(0xFF21D4FD), Color(0xFFB721FF)],
|
||||
|
||||
@@ -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