TF-3704 Fix style label mailbox item
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -204,12 +204,13 @@ class ThemeUtils {
|
||||
|
||||
static TextStyle textStyleInter700({
|
||||
Color? color,
|
||||
double? fontSize,
|
||||
}) => TextStyle(
|
||||
fontFamily: ConstantsUI.fontApp,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: 0.0,
|
||||
fontSize: 15,
|
||||
height: 20 / 15,
|
||||
fontSize: fontSize ?? 15,
|
||||
height: 20 / (fontSize ?? 15),
|
||||
color: color,
|
||||
);
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@ import 'package:flutter/material.dart';
|
||||
class LabelMailboxItemWidgetStyles {
|
||||
static const double labelFolderTextSize = 14;
|
||||
|
||||
static const Color labelFolderTextColor = Colors.black;
|
||||
static const Color teamMailboxEmailTextColor = AppColor.steelGray400;
|
||||
|
||||
static const FontWeight labelFolderTextFontWeight = FontWeight.w400;
|
||||
static const FontWeight labelFolderSelectedFontWeight = FontWeight.bold;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:core/presentation/views/text/text_overflow_builder.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:model/extensions/presentation_mailbox_extension.dart';
|
||||
@@ -42,11 +43,9 @@ class LabelMailboxItemWidget extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final displayNameWidget = TextOverflowBuilder(
|
||||
mailboxNode.item.getDisplayName(context),
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
fontSize: LabelMailboxItemWidgetStyles.labelFolderTextSize,
|
||||
color: LabelMailboxItemWidgetStyles.labelFolderTextColor,
|
||||
fontWeight: _mailboxNameTextFontWeight,
|
||||
),
|
||||
style: isSelected
|
||||
? ThemeUtils.textStyleInter700(color: Colors.black, fontSize: 14)
|
||||
: ThemeUtils.textStyleBodyBody3(color: Colors.black),
|
||||
);
|
||||
|
||||
final nameWithExpandIcon = Row(
|
||||
@@ -134,12 +133,4 @@ class LabelMailboxItemWidget extends StatelessWidget {
|
||||
return childWidget;
|
||||
}
|
||||
}
|
||||
|
||||
FontWeight get _mailboxNameTextFontWeight {
|
||||
if (isSelected || mailboxNode.item.isTeamMailboxes) {
|
||||
return LabelMailboxItemWidgetStyles.labelFolderSelectedFontWeight;
|
||||
} else {
|
||||
return LabelMailboxItemWidgetStyles.labelFolderTextFontWeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user