This commit is contained in:
Dennis Fokin 2024-05-24 13:55:31 +02:00
commit efade221cd
No known key found for this signature in database
GPG Key ID: 870B88256690D8BC
3 changed files with 41 additions and 27 deletions

View File

@ -504,6 +504,12 @@ class _AppPageState extends ConsumerState<AppPage> {
widget.detailViewBuilder != null || widget.keyActionsBuilder != null;
var body = _buildMainContent(context, hasManage);
var navigationText = showNavigation
? (fullyExpanded
? l10n.s_collapse_navigation
: MaterialLocalizations.of(context).openAppDrawerTooltip)
: l10n.s_expand_navigation;
if (widget.onFileDropped != null) {
body = FileDropTarget(
onFileDropped: widget.onFileDropped!,
@ -631,13 +637,8 @@ class _AppPageState extends ConsumerState<AppPage> {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: IconButton(
icon: const Icon(Symbols.menu),
tooltip: showNavigation
? (fullyExpanded
? l10n.s_collapse_navigation
: MaterialLocalizations.of(context)
.openAppDrawerTooltip)
: l10n.s_expand_navigation,
icon: Icon(Symbols.menu, semanticLabel: navigationText),
tooltip: navigationText,
onPressed: fullyExpanded
? () {
ref
@ -681,10 +682,12 @@ class _AppPageState extends ConsumerState<AppPage> {
);
},
icon: widget.keyActionsBadge
? const Badge(
child: Icon(Symbols.more_vert),
? Badge(
child: Icon(Symbols.more_vert,
semanticLabel: l10n.s_configure_yk),
)
: const Icon(Symbols.more_vert),
: Icon(Symbols.more_vert,
semanticLabel: l10n.s_configure_yk),
iconSize: 24,
tooltip: l10n.s_configure_yk,
padding: const EdgeInsets.all(12),

View File

@ -285,8 +285,11 @@ class _DeviceRowState extends ConsumerState<_DeviceRow> {
overflow: TextOverflow.fade,
softWrap: false,
),
subtitle: Text(widget.subtitle,
overflow: TextOverflow.fade, softWrap: false),
subtitle: Text(
widget.subtitle,
overflow: TextOverflow.fade,
softWrap: false,
),
dense: true,
onTap: widget.onTap,
),
@ -314,19 +317,23 @@ class _DeviceRowState extends ConsumerState<_DeviceRow> {
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 6.5),
child: widget.selected
? IconButton.filled(
? Semantics(
label: tooltip,
child: IconButton.filled(
tooltip: isDesktop ? tooltip : null,
icon: widget.leading,
padding: const EdgeInsets.symmetric(horizontal: 8),
onPressed: widget.onTap,
)
: IconButton(
))
: Semantics(
label: tooltip,
child: IconButton(
tooltip: isDesktop ? tooltip : null,
icon: widget.leading,
padding: const EdgeInsets.symmetric(horizontal: 8),
onPressed: widget.onTap,
color: colorScheme.secondary,
),
)),
),
);
}

View File

@ -145,8 +145,12 @@ class NavigationContent extends ConsumerWidget {
...availableSections.map((app) => NavigationItem(
key: app._key,
title: app.getDisplayName(l10n),
leading: Icon(app._icon,
fill: app == currentSection ? 1.0 : 0.0),
leading: Icon(
app._icon,
fill: app == currentSection ? 1.0 : 0.0,
semanticLabel:
!extended ? app.getDisplayName(l10n) : null,
),
collapsed: !extended,
selected: app == currentSection,
onTap: data == null && currentSection == Section.home ||