feat(tablet): clamp remaining screens - settings, queue lists, wizard

- SettingsGroup centers itself at 720dp via its incoming constraint
  (not screen width, so groups inside clamped sheets are never
  over-inset; unbounded-width contexts guarded); priority scaffold,
  bespoke hero cards, and donate page get the same inset - all 18+
  settings pages clamp from shared widgets
- queue list-mode, local/downloaded album track lists, favorite
  artists, home recent-access, and extension detail sections adopt
  wideListInset like the screens fixed earlier
- track metadata content clamped at 720dp, which also tames the
  width-derived spectrogram height
- announcement dialog capped at 480dp wide; setup wizard and
  tutorial content at 560dp with a 400dp action button
This commit is contained in:
zarzet
2026-07-14 09:10:16 +07:00
parent 7573d360bf
commit 1893f3faa8
23 changed files with 499 additions and 321 deletions
+12 -4
View File
@@ -1,9 +1,17 @@
import 'package:flutter/widgets.dart';
/// Horizontal inset that centers content of [maxWidth] at [contentMaxWidth];
/// zero once it fits, so rows stop stretching across a wide surface. Prefer
/// this constraint-based form when the widget may live inside an already
/// clamped box (e.g. a bottom sheet), where screen width would over-inset.
double wideInsetForWidth(double maxWidth, {double contentMaxWidth = 720}) =>
maxWidth > contentMaxWidth ? (maxWidth - contentMaxWidth) / 2 : 0;
/// Horizontal inset that centers full-width list content at [contentMaxWidth]
/// on tablets/landscape; zero on phones, so rows stop stretching across the
/// whole screen.
double wideListInset(BuildContext context, {double contentMaxWidth = 720}) {
final width = MediaQuery.sizeOf(context).width;
return width > contentMaxWidth ? (width - contentMaxWidth) / 2 : 0;
}
double wideListInset(BuildContext context, {double contentMaxWidth = 720}) =>
wideInsetForWidth(
MediaQuery.sizeOf(context).width,
contentMaxWidth: contentMaxWidth,
);