diff --git a/lib/ui/drawing_space/bottom_brush_tool_options.dart b/lib/ui/drawing_space/bottom_brush_tool_options.dart index 70a38307..6dd6d294 100644 --- a/lib/ui/drawing_space/bottom_brush_tool_options.dart +++ b/lib/ui/drawing_space/bottom_brush_tool_options.dart @@ -57,12 +57,14 @@ class _BottomBrushToolOptionsState spacing: 8, children: [ CustomActionChip( + hint: 'Round stroke', chipIcon: const Icon(Icons.circle), onPressed: () => _changeActionChipBackgroundColor(StrokeCap.round), chipBackgroundColor: _roundChipBackgroundColor, ), CustomActionChip( + hint: 'Square stroke', chipIcon: const Icon(Icons.square), onPressed: () => _changeActionChipBackgroundColor(StrokeCap.square), diff --git a/lib/ui/landing_page/custom_action_button.dart b/lib/ui/landing_page/custom_action_button.dart index 2bca6753..bb8b6ae9 100644 --- a/lib/ui/landing_page/custom_action_button.dart +++ b/lib/ui/landing_page/custom_action_button.dart @@ -4,12 +4,14 @@ class CustomActionButton extends StatelessWidget { final String heroTag; final IconData icon; final VoidCallback onPressed; + final String hint; const CustomActionButton({ Key? key, required this.heroTag, required this.icon, required this.onPressed, + required this.hint, }) : super(key: key); @override @@ -18,6 +20,7 @@ class CustomActionButton extends StatelessWidget { heroTag: heroTag, backgroundColor: const Color(0xFFFFAB08), foregroundColor: const Color(0xFFFFFFFF), + tooltip: hint, child: Icon(icon), onPressed: () async => onPressed(), ); diff --git a/lib/ui/landing_page/landing_page.dart b/lib/ui/landing_page/landing_page.dart index 26601a00..df2c45e1 100644 --- a/lib/ui/landing_page/landing_page.dart +++ b/lib/ui/landing_page/landing_page.dart @@ -161,6 +161,7 @@ class _LandingPageState extends ConsumerState { CustomActionButton( heroTag: 'import_image', icon: Icons.file_download, + hint: 'Load image', onPressed: () async { final bool imageLoaded = await ioHandler.loadImage(context, this, false); @@ -175,6 +176,7 @@ class _LandingPageState extends ConsumerState { CustomActionButton( heroTag: 'new_image', icon: Icons.add, + hint: 'New image', onPressed: () async { _clearCanvas(); _navigateToPocketPaint(); diff --git a/lib/ui/shared/custom_action_chip.dart b/lib/ui/shared/custom_action_chip.dart index 4642e2aa..697df41a 100644 --- a/lib/ui/shared/custom_action_chip.dart +++ b/lib/ui/shared/custom_action_chip.dart @@ -7,12 +7,14 @@ class CustomActionChip extends StatelessWidget { final Color chipBackgroundColor; final EdgeInsetsGeometry? padding; final MaterialTapTargetSize? materialTapTargetSize; + final String hint; const CustomActionChip({ super.key, required this.chipIcon, required this.onPressed, required this.chipBackgroundColor, + required this.hint, this.shape, this.padding, this.materialTapTargetSize, @@ -21,6 +23,7 @@ class CustomActionChip extends StatelessWidget { @override Widget build(BuildContext context) { return ActionChip( + tooltip: hint, label: chipIcon, onPressed: onPressed, shape: shape ??