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