TF-3410 Fix list email item in ThreadView was not applied correct font

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-03-12 13:50:08 +07:00
committed by Dat H. Pham
parent a258dec4ee
commit 0ee3fcbf40
4 changed files with 91 additions and 60 deletions
@@ -26,6 +26,7 @@ extension AppColor on Color {
static const mailboxBackgroundColor = Color(0xFFFFFFFF);
static const mailboxSelectedTextColor = Color(0xFF3840F7);
static const mailboxTextColor = Color(0xFF182952);
static const emailMailboxContainColor = Color(0xFF162546);
static const mailboxSelectedTextNumberColor = Color(0xFF182952);
static const mailboxSelectedIconColor = Color(0xFF3840F7);
static const mailboxIconColor = Color(0xFF7E869B);
@@ -36,7 +37,7 @@ extension AppColor on Color {
static const myFolderTitleColor = Color(0xFF7E869B);
static const titleAppBarMailboxListMail = Color(0xFF182952);
static const counterMailboxColor = Color(0xFF3840F7);
static const backgroundCounterMailboxColor = Color(0xFFE6E5FF);
static const backgroundCounterMailboxColor = Color(0xFFE3E1FD);
static const backgroundCounterMailboxSelectedColor = Color(0x17313131);
static const bgMailboxListMail = Color(0xFFFBFBFF);
static const bgMessenger = Color(0xFFF2F2F5);
+40 -3
View File
@@ -110,16 +110,24 @@ class ThemeUtils {
color: color,
);
static TextStyle textStyleBodyBody2({Color? color, FontWeight? fontWeight}) => TextStyle(
static TextStyle textStyleBodyBody2({
Color? color,
Color? backgroundColor,
FontWeight? fontWeight,
}) => TextStyle(
fontFamily: ConstantsUI.fontApp,
fontWeight: fontWeight ?? FontWeight.w400,
letterSpacing: 0.0,
fontSize: 15,
height: 20 / 15,
color: color,
backgroundColor: backgroundColor,
);
static TextStyle textStyleBodyBody3({Color? color, FontWeight? fontWeight}) => TextStyle(
static TextStyle textStyleBodyBody3({
Color? color,
FontWeight? fontWeight,
}) => TextStyle(
fontFamily: ConstantsUI.fontApp,
fontWeight: fontWeight ?? FontWeight.w400,
letterSpacing: 0.0,
@@ -128,7 +136,24 @@ class ThemeUtils {
color: color,
);
static TextStyle textStyleHeadingH6({Color? color, FontWeight? fontWeight}) => TextStyle(
static TextStyle textStyleBodyContact({
Color? color,
Color? backgroundColor,
FontWeight? fontWeight,
}) => TextStyle(
fontFamily: ConstantsUI.fontApp,
fontWeight: fontWeight ?? FontWeight.w600,
letterSpacing: 0.0,
fontSize: 15,
height: 20 / 15,
color: color,
backgroundColor: backgroundColor,
);
static TextStyle textStyleHeadingH6({
Color? color,
FontWeight? fontWeight,
}) => TextStyle(
fontFamily: ConstantsUI.fontApp,
fontWeight: fontWeight ?? FontWeight.w700,
letterSpacing: 0.0,
@@ -137,6 +162,18 @@ class ThemeUtils {
color: color,
);
static TextStyle textStyleHeadingHeadingSmall({
Color? color,
FontWeight? fontWeight,
}) => TextStyle(
fontFamily: ConstantsUI.fontApp,
fontWeight: fontWeight ?? FontWeight.w500,
letterSpacing: 0.0,
fontSize: 17,
height: 22 / 17,
color: color,
);
static TextSelectionThemeData get _textSelectionTheme {
return const TextSelectionThemeData(
cursorColor: AppColor.primaryColor,
@@ -4,8 +4,8 @@ class RichTextBuilder extends StatefulWidget {
final String textOrigin;
final String wordToStyle;
final TextStyle styleOrigin;
final TextStyle styleWord;
final TextStyle? styleOrigin;
final TextStyle? styleWord;
final String? preMarkedText;
final bool ensureHighlightVisible;
@@ -91,8 +91,8 @@ class _RichTextBuilderState extends State<RichTextBuilder> with AutomaticKeepAli
List<InlineSpan> _getSpans({
required String text,
required String word,
required TextStyle styleOrigin,
required TextStyle styleWord,
required TextStyle? styleOrigin,
required TextStyle? styleWord,
}) {
if (word.isEmpty) {
return [TextSpan(text: text, style: styleOrigin)];