Add button tooltips

This commit is contained in:
problematicconsumer
2023-08-24 22:19:36 +03:30
parent 49519b7fd7
commit f8964cab46
2 changed files with 28 additions and 19 deletions

View File

@@ -153,30 +153,38 @@ class ProfileActionButton extends HookConsumerWidget {
);
if (!showAllActions) {
return InkWell(
onTap: () {
if (updateProfileMutation.state.isInProgress) {
return;
}
updateProfileMutation.setFuture(
ref.read(profilesNotifierProvider.notifier).updateProfile(profile),
);
},
child: const Icon(Icons.update),
return Tooltip(
message: t.profile.update.buttonTxt,
child: InkWell(
onTap: () {
if (updateProfileMutation.state.isInProgress) {
return;
}
updateProfileMutation.setFuture(
ref
.read(profilesNotifierProvider.notifier)
.updateProfile(profile),
);
},
child: const Icon(Icons.update),
),
);
}
return ProfileActionsMenu(
profile,
(context, controller, child) {
return InkWell(
onTap: () {
if (controller.isOpen) {
controller.close();
} else {
controller.open();
}
},
child: const Icon(Icons.more_vert),
return Tooltip(
message: MaterialLocalizations.of(context).showMenuTooltip,
child: InkWell(
onTap: () {
if (controller.isOpen) {
controller.close();
} else {
controller.open();
}
},
child: const Icon(Icons.more_vert),
),
);
},
);