TF-3759 Update style popup context menu for composer view
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -40,32 +40,37 @@ class PopupItemWidget extends StatelessWidget {
|
||||
onTap: onCallbackAction,
|
||||
child: Container(
|
||||
height: PopupItemWidgetStyle.height,
|
||||
constraints: const BoxConstraints(minWidth: PopupItemWidgetStyle.minWidth),
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: PopupItemWidgetStyle.maxWidth,
|
||||
),
|
||||
padding: padding,
|
||||
child: Row(children: [
|
||||
SvgPicture.asset(
|
||||
iconAction,
|
||||
width: iconSize ?? PopupItemWidgetStyle.iconSize,
|
||||
height: iconSize ?? PopupItemWidgetStyle.iconSize,
|
||||
fit: BoxFit.fill,
|
||||
colorFilter: colorIcon?.asFilter()
|
||||
),
|
||||
SizedBox(width: iconSpace ?? PopupItemWidgetStyle.space),
|
||||
Expanded(child: Text(
|
||||
nameAction,
|
||||
style: styleName ?? PopupItemWidgetStyle.labelTextStyle
|
||||
)),
|
||||
if (isSelected == true && selectedIcon != null)
|
||||
Padding(
|
||||
padding: PopupItemWidgetStyle.iconSelectedPadding,
|
||||
child: SvgPicture.asset(
|
||||
selectedIcon!,
|
||||
width: PopupItemWidgetStyle.selectedIconSize,
|
||||
height: PopupItemWidgetStyle.selectedIconSize,
|
||||
fit: BoxFit.fill
|
||||
),
|
||||
)
|
||||
]),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
iconAction,
|
||||
width: iconSize ?? PopupItemWidgetStyle.iconSize,
|
||||
height: iconSize ?? PopupItemWidgetStyle.iconSize,
|
||||
fit: BoxFit.fill,
|
||||
colorFilter: colorIcon?.asFilter()
|
||||
),
|
||||
SizedBox(width: iconSpace ?? PopupItemWidgetStyle.space),
|
||||
Expanded(child: Text(
|
||||
nameAction,
|
||||
style: styleName ?? PopupItemWidgetStyle.labelTextStyle
|
||||
)),
|
||||
if (isSelected == true && selectedIcon != null)
|
||||
Padding(
|
||||
padding: PopupItemWidgetStyle.iconSelectedPadding,
|
||||
child: SvgPicture.asset(
|
||||
selectedIcon!,
|
||||
width: PopupItemWidgetStyle.selectedIconSize,
|
||||
height: PopupItemWidgetStyle.selectedIconSize,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
|
||||
@@ -34,15 +34,18 @@ class PopupMenuOverlayWidget extends StatelessWidget {
|
||||
controller: controller,
|
||||
menuBuilder: () {
|
||||
return Material(
|
||||
elevation: elevation ?? 10,
|
||||
borderRadius: BorderRadius.circular(borderRadius ?? 12),
|
||||
elevation: elevation ?? 8,
|
||||
borderRadius: BorderRadius.all(Radius.circular(borderRadius ?? 6)),
|
||||
color: backgroundColor ?? Colors.white,
|
||||
child: PointerInterceptor(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor ?? Colors.white,
|
||||
borderRadius: BorderRadius.circular(borderRadius ?? 12)),
|
||||
padding: padding,
|
||||
color: backgroundColor ?? Colors.white,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(borderRadius ?? 6),
|
||||
),
|
||||
),
|
||||
padding: padding ?? const EdgeInsets.symmetric(vertical: 8),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: arrangeAsList
|
||||
? IntrinsicWidth(child: Column(children: listButtonAction))
|
||||
@@ -55,7 +58,7 @@ class PopupMenuOverlayWidget extends StatelessWidget {
|
||||
position: position,
|
||||
barrierColor: Colors.transparent,
|
||||
arrowSize: 0.0,
|
||||
verticalMargin: 8,
|
||||
verticalMargin: 2.0,
|
||||
child: iconButton,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user