mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-25 07:25:27 -04:00
fix popup menu
This commit is contained in:
parent
8aaca62ea7
commit
6421a77572
4 changed files with 15 additions and 34 deletions
|
@ -95,19 +95,10 @@ class _ContactsBrowserState extends State<ContactsBrowser>
|
|||
void Function()? onTap}) =>
|
||||
PopupMenuItem(
|
||||
onTap: onTap,
|
||||
child: DecoratedBox(
|
||||
decoration: ShapeDecoration(
|
||||
color: menuBackgroundColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: scaleConfig.useVisualIndicators
|
||||
? BorderSide(
|
||||
width: 2,
|
||||
color: menuBorderColor,
|
||||
strokeAlign: 0)
|
||||
: BorderSide.none,
|
||||
borderRadius: BorderRadius.circular(
|
||||
8 * scaleConfig.borderRadiusScale))),
|
||||
child: Row(spacing: 4.scaled(context), children: [
|
||||
child: Row(
|
||||
spacing: 8.scaled(context),
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Icon(iconData, size: 32.scaled(context)),
|
||||
Text(
|
||||
text,
|
||||
|
@ -115,9 +106,7 @@ class _ContactsBrowserState extends State<ContactsBrowser>
|
|||
maxLines: 2,
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
]).paddingAll(4.scaled(context)))
|
||||
.paddingLTRB(0, 2.scaled(context), 0, 2.scaled(context)));
|
||||
|
||||
]));
|
||||
final inviteMenuItems = [
|
||||
makeMenuButton(
|
||||
iconData: Icons.contact_page,
|
||||
|
@ -141,7 +130,7 @@ class _ContactsBrowserState extends State<ContactsBrowser>
|
|||
|
||||
return PopupMenuButton(
|
||||
itemBuilder: (_) => inviteMenuItems,
|
||||
menuPadding: const EdgeInsets.symmetric(vertical: 4).scaled(context),
|
||||
menuPadding: const EdgeInsets.symmetric(vertical: 8).scaled(context),
|
||||
tooltip: translate('add_contact_sheet.add_contact'),
|
||||
child: Icon(
|
||||
size: 32.scaled(context), Icons.person_add, color: menuIconColor));
|
||||
|
|
|
@ -192,9 +192,10 @@ class ScaleTheme extends ThemeExtension<ScaleTheme> {
|
|||
ScaleInputDecoratorTheme(scheme, config, textTheme),
|
||||
sliderTheme: sliderTheme,
|
||||
popupMenuTheme: PopupMenuThemeData(
|
||||
color: scheme.primaryScale.subtleBackground,
|
||||
color: scheme.primaryScale.elementBackground,
|
||||
shadowColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(color: scheme.primaryScale.border, width: 2),
|
||||
borderRadius:
|
||||
BorderRadius.circular(8 * config.borderRadiusScale))),
|
||||
extensions: <ThemeExtension<dynamic>>[scheme, config, this]);
|
||||
|
|
|
@ -1527,14 +1527,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.12.1"
|
||||
star_menu:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: star_menu
|
||||
sha256: f29c7d255677c49ec2412ec2d17220d967f54b72b9e6afc5688fe122ea4d1d78
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -92,7 +92,6 @@ dependencies:
|
|||
ref: main
|
||||
split_view: ^3.2.1
|
||||
stack_trace: ^1.12.1
|
||||
star_menu: ^4.0.1
|
||||
stream_transform: ^2.1.1
|
||||
toastification: ^3.0.2
|
||||
transitioned_indexed_stack: ^1.0.2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue