Enlarge viewer controls and respect safe areas

This commit is contained in:
2026-11-02 17:50:27 +00:00
parent e2ba091f7d
commit e65e2800e6
7 changed files with 188 additions and 152 deletions
+16 -4
View File
@@ -48,12 +48,14 @@ class ChevronPager extends StatelessWidget {
excludeSemantics: true,
child: CupertinoButton(
key: key,
padding: const EdgeInsets.all(8),
padding: EdgeInsets.zero,
minimumSize: const Size(44, 44),
onPressed: onPressed,
child: Icon(
previous
? CupertinoIcons.chevron_left
: CupertinoIcons.chevron_right,
size: 30,
),
),
);
@@ -61,24 +63,34 @@ class ChevronPager extends StatelessWidget {
return IconButton(
key: key,
tooltip: label,
constraints: const BoxConstraints(minWidth: 48, minHeight: 48),
padding: EdgeInsets.zero,
onPressed: onPressed,
icon: Icon(previous ? Icons.chevron_left : Icons.chevron_right),
icon: Icon(
previous ? Icons.chevron_left : Icons.chevron_right,
size: 28,
),
);
}
return Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16, 4, 8, 4),
// The surrounding glass pill supplies the edge gap. Keeping this row's
// horizontal padding at zero also leaves room for four 48px controls on
// a narrow phone at large text sizes.
padding: EdgeInsets.zero,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Flexible(
fit: FlexFit.tight,
child: Text(
'${index + 1} of $count',
key: positionKey,
style: Theme.of(context).textTheme.labelLarge,
overflow: TextOverflow.ellipsis,
),
),
const SizedBox(width: 4),
const SizedBox(width: 0),
chevron(
key: previousKey,
previous: true,