|
|
@@ -71,6 +71,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
? (screen.width * 0.31).clamp(300.0, 400.0)
|
|
|
: (screen.width * 0.37).clamp(300.0, 440.0);
|
|
|
final gap = compact ? 26.0 : 40.0;
|
|
|
+ final shortcutLabelAllowance = ShortcutGrid.labelAllowanceFor(compact);
|
|
|
|
|
|
final obdTemperature = obd.ambientCelsius;
|
|
|
final useObdTemperature =
|
|
|
@@ -257,41 +258,48 @@ class _HomeScreenState extends State<HomeScreen> {
|
|
|
children: [
|
|
|
SizedBox(
|
|
|
width: leftWidth,
|
|
|
- child: Column(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
- mainAxisAlignment: MainAxisAlignment.end,
|
|
|
- children: [
|
|
|
- if (showObdSpeed) ...[
|
|
|
- ObdCard(
|
|
|
- speedKmh: obd.speedKmh,
|
|
|
- throttlePercent: obd.throttlePercent,
|
|
|
- compact: compact,
|
|
|
- ),
|
|
|
- SizedBox(height: compact ? 12 : 14),
|
|
|
- ] else if (showGpsSpeed) ...[
|
|
|
- GpsSpeedCard(
|
|
|
- speedKmh: gps.speedKmh ?? 0,
|
|
|
+ child: Padding(
|
|
|
+ padding: EdgeInsets.only(
|
|
|
+ bottom: shortcutLabelAllowance,
|
|
|
+ ),
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
|
+ mainAxisAlignment: MainAxisAlignment.end,
|
|
|
+ children: [
|
|
|
+ if (showObdSpeed) ...[
|
|
|
+ ObdCard(
|
|
|
+ speedKmh: obd.speedKmh,
|
|
|
+ throttlePercent: obd.throttlePercent,
|
|
|
+ compact: compact,
|
|
|
+ ),
|
|
|
+ SizedBox(height: compact ? 12 : 14),
|
|
|
+ ] else if (showGpsSpeed) ...[
|
|
|
+ GpsSpeedCard(
|
|
|
+ speedKmh: gps.speedKmh ?? 0,
|
|
|
+ compact: compact,
|
|
|
+ ),
|
|
|
+ SizedBox(height: compact ? 12 : 14),
|
|
|
+ ],
|
|
|
+ VolumeCard(
|
|
|
+ volume: system.volume,
|
|
|
compact: compact,
|
|
|
+ onSetVolume: system.setVolume,
|
|
|
+ onToggleMute: system.toggleMute,
|
|
|
+ isMusicPlaying: cardPlaying,
|
|
|
+ onPlayPause: jellyfinActive
|
|
|
+ ? () => unawaited(
|
|
|
+ jellyfinPlayback.toggle(),
|
|
|
+ )
|
|
|
+ : () =>
|
|
|
+ unawaited(_toggleMusic(context)),
|
|
|
+ media: cardMedia,
|
|
|
+ diagnostics: system.volumeDiagnostics,
|
|
|
+ onToggleDiagnostics:
|
|
|
+ system.toggleVolumeDiagnostics,
|
|
|
+ unconfirmed: system.volumeUnconfirmed,
|
|
|
),
|
|
|
- SizedBox(height: compact ? 12 : 14),
|
|
|
],
|
|
|
- VolumeCard(
|
|
|
- volume: system.volume,
|
|
|
- compact: compact,
|
|
|
- onSetVolume: system.setVolume,
|
|
|
- onToggleMute: system.toggleMute,
|
|
|
- isMusicPlaying: cardPlaying,
|
|
|
- onPlayPause: jellyfinActive
|
|
|
- ? () =>
|
|
|
- unawaited(jellyfinPlayback.toggle())
|
|
|
- : () => unawaited(_toggleMusic(context)),
|
|
|
- media: cardMedia,
|
|
|
- diagnostics: system.volumeDiagnostics,
|
|
|
- onToggleDiagnostics:
|
|
|
- system.toggleVolumeDiagnostics,
|
|
|
- unconfirmed: system.volumeUnconfirmed,
|
|
|
- ),
|
|
|
- ],
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
SizedBox(width: gap),
|