Apply new style left menu in Settings
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
+37
-19
@@ -32,36 +32,54 @@ class AccountMenuItemTileBuilder extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
key: Key('${menuItem.getAliasBrowser()}_account_menu_item_tile'),
|
||||
padding: padding ?? const EdgeInsets.only(top: 6),
|
||||
padding: padding ?? const EdgeInsets.only(top: 4),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () => onSelectAccountMenuItemAction.call(menuItem),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(10)),
|
||||
color: menuItemSelected == menuItem
|
||||
? AppColor.colorBgMailboxSelected
|
||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||
color: _isSelected
|
||||
? AppColor.lightGrayEAEDF2
|
||||
: Colors.transparent,
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
child: Column(children: [
|
||||
Row(children: [
|
||||
SvgPicture.asset(
|
||||
menuItem.getIcon(imagePaths),
|
||||
width: 20,
|
||||
height: 20,
|
||||
fit: BoxFit.fill),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(child: Text(
|
||||
menuItem.getName(AppLocalizations.of(context)),
|
||||
style: ThemeUtils.textStyleBodyBody3(color: Colors.black)
|
||||
))
|
||||
]),
|
||||
padding: const EdgeInsets.all(8),
|
||||
height: 36,
|
||||
child: Row(children: [
|
||||
SvgPicture.asset(
|
||||
menuItem.getIcon(imagePaths),
|
||||
width: 20,
|
||||
height: 20,
|
||||
fit: BoxFit.fill,
|
||||
colorFilter: AppColor.primaryLinShare.asFilter(),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(child: Text(
|
||||
menuItem.getName(AppLocalizations.of(context)),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: _titleStyle,
|
||||
)),
|
||||
])
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
bool get _isSelected => menuItemSelected == menuItem;
|
||||
|
||||
TextStyle get _titleStyle {
|
||||
if (_isSelected) {
|
||||
return ThemeUtils.textStyleInter600().copyWith(
|
||||
fontSize: 15,
|
||||
height: 20 / 15,
|
||||
letterSpacing: 0.0,
|
||||
color: Colors.black,
|
||||
);
|
||||
} else {
|
||||
return ThemeUtils.textStyleBodyBody2(color: Colors.black);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user