From 96922e1f9ac35f3362ab97561fc35b376a65973a Mon Sep 17 00:00:00 2001 From: klockky Date: Sat, 23 May 2026 08:36:53 +0000 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=83=D0=BD=D0=BA=D1=82=D1=8B=20=D1=81?= =?UTF-8?q?=D0=BF=D0=B8=D1=81=D0=BA=D0=B0=20=D0=BF=D0=BE=D0=B4=D1=81=D0=B2?= =?UTF-8?q?=D0=B5=D1=87=D0=B8=D0=B2=D0=B0=D1=8E=D1=82=D1=81=D1=8F=20=D0=BA?= =?UTF-8?q?=D0=B0=D0=BA=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B5=D1=82=D0=BA=D0=B8?= =?UTF-8?q?=20primary-=D1=86=D0=B2=D0=B5=D1=82=D0=BE=D0=BC=20(destructive?= =?UTF-8?q?=20=E2=80=94=20error)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widgets/message_actions_overlay.dart | 52 +++++++++++-------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/lib/frontend/widgets/message_actions_overlay.dart b/lib/frontend/widgets/message_actions_overlay.dart index 3d87892..67d2a07 100644 --- a/lib/frontend/widgets/message_actions_overlay.dart +++ b/lib/frontend/widgets/message_actions_overlay.dart @@ -520,15 +520,12 @@ class _ListMenuItem extends StatelessWidget { @override Widget build(BuildContext context) { final cs = Theme.of(context).colorScheme; - final fg = action.destructive ? cs.error : cs.onSurface; - final hoverBg = action.destructive - ? cs.error.withValues(alpha: 0.14) - : cs.primary.withValues(alpha: 0.16); - return AnimatedContainer( - duration: const Duration(milliseconds: 120), - curve: Curves.easeOutCubic, + final pillBg = action.destructive ? cs.error : cs.primary; + final onPill = action.destructive ? cs.onError : cs.onPrimary; + final restFg = action.destructive ? cs.error : cs.onSurface; + final fg = highlighted ? onPill : restFg; + return SizedBox( height: 48, - color: highlighted ? hoverBg : Colors.transparent, child: Material( color: Colors.transparent, child: InkWell( @@ -537,23 +534,32 @@ class _ListMenuItem extends StatelessWidget { action.onTap(); }, child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Row( - children: [ - Icon(action.icon, color: fg, size: 22), - const SizedBox(width: 14), - Expanded( - child: Text( - action.label, - style: TextStyle( - color: fg, - fontSize: 15, - fontWeight: - highlighted ? FontWeight.w600 : FontWeight.w500, + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), + child: AnimatedContainer( + duration: const Duration(milliseconds: 140), + curve: Curves.easeOutCubic, + decoration: BoxDecoration( + color: highlighted ? pillBg : Colors.transparent, + borderRadius: BorderRadius.circular(20), + ), + padding: const EdgeInsets.symmetric(horizontal: 14), + child: Row( + children: [ + Icon(action.icon, color: fg, size: 22), + const SizedBox(width: 14), + Expanded( + child: Text( + action.label, + style: TextStyle( + color: fg, + fontSize: 15, + fontWeight: + highlighted ? FontWeight.w600 : FontWeight.w500, + ), ), ), - ), - ], + ], + ), ), ), ),