Skip to content

Commit

Permalink
Merge pull request #883 from nextcloud/fix/neon_files/navigator
Browse files Browse the repository at this point in the history
fix(neon_files): Fix files navigator
  • Loading branch information
provokateurin authored Sep 30, 2023
2 parents bedf953 + 87138b0 commit f99e2c1
Showing 1 changed file with 10 additions and 22 deletions.
32 changes: 10 additions & 22 deletions packages/neon/neon_files/lib/widgets/navigator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ class FilesBrowserNavigator extends StatelessWidget {
final List<String> 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,
Expand All @@ -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([]);
},
Expand All @@ -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),
),
);
}

0 comments on commit f99e2c1

Please sign in to comment.