mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-25 23:45:40 -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}) =>
|
void Function()? onTap}) =>
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: DecoratedBox(
|
child: Row(
|
||||||
decoration: ShapeDecoration(
|
spacing: 8.scaled(context),
|
||||||
color: menuBackgroundColor,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
shape: RoundedRectangleBorder(
|
children: [
|
||||||
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: [
|
|
||||||
Icon(iconData, size: 32.scaled(context)),
|
Icon(iconData, size: 32.scaled(context)),
|
||||||
Text(
|
Text(
|
||||||
text,
|
text,
|
||||||
|
@ -115,9 +106,7 @@ class _ContactsBrowserState extends State<ContactsBrowser>
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
)
|
)
|
||||||
]).paddingAll(4.scaled(context)))
|
]));
|
||||||
.paddingLTRB(0, 2.scaled(context), 0, 2.scaled(context)));
|
|
||||||
|
|
||||||
final inviteMenuItems = [
|
final inviteMenuItems = [
|
||||||
makeMenuButton(
|
makeMenuButton(
|
||||||
iconData: Icons.contact_page,
|
iconData: Icons.contact_page,
|
||||||
|
@ -141,7 +130,7 @@ class _ContactsBrowserState extends State<ContactsBrowser>
|
||||||
|
|
||||||
return PopupMenuButton(
|
return PopupMenuButton(
|
||||||
itemBuilder: (_) => inviteMenuItems,
|
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'),
|
tooltip: translate('add_contact_sheet.add_contact'),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
size: 32.scaled(context), Icons.person_add, color: menuIconColor));
|
size: 32.scaled(context), Icons.person_add, color: menuIconColor));
|
||||||
|
|
|
@ -192,9 +192,10 @@ class ScaleTheme extends ThemeExtension<ScaleTheme> {
|
||||||
ScaleInputDecoratorTheme(scheme, config, textTheme),
|
ScaleInputDecoratorTheme(scheme, config, textTheme),
|
||||||
sliderTheme: sliderTheme,
|
sliderTheme: sliderTheme,
|
||||||
popupMenuTheme: PopupMenuThemeData(
|
popupMenuTheme: PopupMenuThemeData(
|
||||||
color: scheme.primaryScale.subtleBackground,
|
color: scheme.primaryScale.elementBackground,
|
||||||
shadowColor: Colors.transparent,
|
shadowColor: Colors.transparent,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(color: scheme.primaryScale.border, width: 2),
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(8 * config.borderRadiusScale))),
|
BorderRadius.circular(8 * config.borderRadiusScale))),
|
||||||
extensions: <ThemeExtension<dynamic>>[scheme, config, this]);
|
extensions: <ThemeExtension<dynamic>>[scheme, config, this]);
|
||||||
|
|
|
@ -1527,14 +1527,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.12.1"
|
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:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -92,7 +92,6 @@ dependencies:
|
||||||
ref: main
|
ref: main
|
||||||
split_view: ^3.2.1
|
split_view: ^3.2.1
|
||||||
stack_trace: ^1.12.1
|
stack_trace: ^1.12.1
|
||||||
star_menu: ^4.0.1
|
|
||||||
stream_transform: ^2.1.1
|
stream_transform: ^2.1.1
|
||||||
toastification: ^3.0.2
|
toastification: ^3.0.2
|
||||||
transitioned_indexed_stack: ^1.0.2
|
transitioned_indexed_stack: ^1.0.2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue