From 87138b012716b74ac68270d114206662d7c3319e Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sat, 30 Sep 2023 07:22:01 +0200 Subject: [PATCH] fix(neon_files): Fix files navigator Signed-off-by: jld3103 --- .../neon_files/lib/widgets/navigator.dart | 32 ++++++------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/packages/neon/neon_files/lib/widgets/navigator.dart b/packages/neon/neon_files/lib/widgets/navigator.dart index b0493d94..22cef8ff 100644 --- a/packages/neon/neon_files/lib/widgets/navigator.dart +++ b/packages/neon/neon_files/lib/widgets/navigator.dart @@ -10,11 +10,9 @@ class FilesBrowserNavigator extends StatelessWidget { final List path; final FilesBrowserBloc bloc; - static const double _height = 30; - @override Widget build(final BuildContext context) => SizedBox( - height: _height, + height: ButtonTheme.of(context).height, child: ListView.separated( padding: const EdgeInsets.symmetric( horizontal: 10, @@ -30,10 +28,7 @@ class FilesBrowserNavigator extends StatelessWidget { vertical: VisualDensity.minimumDensity, ), tooltip: AppLocalizations.of(context).goToPath(''), - icon: const Icon( - Icons.house, - size: _height, - ), + icon: const Icon(Icons.house), onPressed: () { bloc.setPath([]); }, @@ -43,24 +38,17 @@ class FilesBrowserNavigator extends StatelessWidget { final path = this.path.sublist(0, index); final label = path.join('/'); - return Tooltip( - message: AppLocalizations.of(context).goToPath(label), - excludeFromSemantics: true, - child: TextButton( - onPressed: () { - bloc.setPath(path); - }, - child: Text( - path.last, - semanticsLabel: AppLocalizations.of(context).goToPath(label), - ), + return TextButton( + onPressed: () { + bloc.setPath(path); + }, + child: Text( + path.last, + semanticsLabel: AppLocalizations.of(context).goToPath(label), ), ); }, - separatorBuilder: (final context, final index) => const Icon( - Icons.keyboard_arrow_right, - size: _height, - ), + separatorBuilder: (final context, final index) => const Icon(Icons.keyboard_arrow_right), ), ); }