From ef946c39673f40a0a134254bf61a31062e2de397 Mon Sep 17 00:00:00 2001 From: Daniel Eshkeri Date: Mon, 4 Nov 2024 09:54:08 +0000 Subject: [PATCH 1/2] fix: removed hit test behaviour from avatar rail --- lib/src/components/avatar_rail/avatar_rail.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/src/components/avatar_rail/avatar_rail.dart b/lib/src/components/avatar_rail/avatar_rail.dart index c57feac4..a9066c93 100644 --- a/lib/src/components/avatar_rail/avatar_rail.dart +++ b/lib/src/components/avatar_rail/avatar_rail.dart @@ -88,7 +88,6 @@ class ZetaAvatarRail extends StatelessWidget { children: [ SingleChildScrollView( scrollDirection: Axis.horizontal, - hitTestBehavior: HitTestBehavior.translucent, child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ From 55c5e91f7d95ef066da1127ec4ee11486890c7a9 Mon Sep 17 00:00:00 2001 From: Daniel Eshkeri Date: Mon, 4 Nov 2024 10:54:33 +0000 Subject: [PATCH 2/2] feat: added mouse region to give click pointer --- lib/src/components/avatars/avatar.dart | 71 ++++++++++++++------------ 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/lib/src/components/avatars/avatar.dart b/lib/src/components/avatars/avatar.dart index 39a1b7eb..79453f2d 100644 --- a/lib/src/components/avatars/avatar.dart +++ b/lib/src/components/avatars/avatar.dart @@ -256,41 +256,44 @@ class ZetaAvatar extends ZetaStatelessWidget { children: [ Stack( children: [ - GestureDetector( - onTap: onTap, - child: Container( - width: pSize, - height: pSize, - decoration: BoxDecoration( - border: borderColor != null ? Border.all(color: borderColor!, width: 0) : null, - borderRadius: Zeta.of(context).radius.full, - color: - backgroundColor ?? (_showPlaceholder ? zetaColors.surfacePrimary : zetaColors.cool.shade20), - ), - child: borderColor != null - ? Container( - width: pSize, - height: pSize, - decoration: BoxDecoration( - color: backgroundColor ?? zetaColors.surfaceHover, - border: Border.all(color: borderColor!, width: borderSize(context)), - borderRadius: Zeta.of(context).radius.full, - ), - child: ClipRRect( - borderRadius: Zeta.of(context).radius.full, - child: innerContent, - ), - ) - : DecoratedBox( - decoration: BoxDecoration( - borderRadius: Zeta.of(context).radius.full, - color: backgroundColor ?? zetaColors.surfaceHover, - ), - child: ClipRRect( - borderRadius: Zeta.of(context).radius.full, - child: innerContent, + MouseRegion( + cursor: onTap != null ? SystemMouseCursors.click : SystemMouseCursors.basic, + child: GestureDetector( + onTap: onTap, + child: Container( + width: pSize, + height: pSize, + decoration: BoxDecoration( + border: borderColor != null ? Border.all(color: borderColor!, width: 0) : null, + borderRadius: Zeta.of(context).radius.full, + color: backgroundColor ?? + (_showPlaceholder ? zetaColors.surfacePrimary : zetaColors.cool.shade20), + ), + child: borderColor != null + ? Container( + width: pSize, + height: pSize, + decoration: BoxDecoration( + color: backgroundColor ?? zetaColors.surfaceHover, + border: Border.all(color: borderColor!, width: borderSize(context)), + borderRadius: Zeta.of(context).radius.full, + ), + child: ClipRRect( + borderRadius: Zeta.of(context).radius.full, + child: innerContent, + ), + ) + : DecoratedBox( + decoration: BoxDecoration( + borderRadius: Zeta.of(context).radius.full, + color: backgroundColor ?? zetaColors.surfaceHover, + ), + child: ClipRRect( + borderRadius: Zeta.of(context).radius.full, + child: innerContent, + ), ), - ), + ), ), ), if (upperBadge != null)