diff --git a/lib/screens/livetv/live_tv_screen.dart b/lib/screens/livetv/live_tv_screen.dart index a16db00c..2274240d 100644 --- a/lib/screens/livetv/live_tv_screen.dart +++ b/lib/screens/livetv/live_tv_screen.dart @@ -10,6 +10,7 @@ import '../../mixins/refreshable.dart'; import '../../mixins/tab_navigation_mixin.dart'; import '../../providers/multi_server_provider.dart'; import '../../utils/app_logger.dart'; +import '../../utils/desktop_window_padding.dart'; import '../../utils/platform_detector.dart'; import '../../widgets/app_icon.dart'; import '../../widgets/focusable_tab_chip.dart'; @@ -267,7 +268,7 @@ class _LiveTvScreenState extends State ], ) : Text(t.liveTv.title), - actions: [ + actions: DesktopAppBarHelper.buildAdjustedActions([ FocusableActionBar( key: _actionBarKey, onNavigateLeft: () => getTabChipFocusNode(tabCount - 1).requestFocus(), @@ -280,7 +281,7 @@ class _LiveTvScreenState extends State ), ], ), - ], + ]), ), body: _buildLiveTvBody(theme, useSideNav), ); diff --git a/lib/screens/livetv/program_details_sheet.dart b/lib/screens/livetv/program_details_sheet.dart index de771107..0cc9ff24 100644 --- a/lib/screens/livetv/program_details_sheet.dart +++ b/lib/screens/livetv/program_details_sheet.dart @@ -120,7 +120,7 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent } if (!program.isCurrentlyAiring && widget.onTuneChannel != null) { - buttons.add(const SizedBox(width: 8)); + if (buttons.isNotEmpty) buttons.add(const SizedBox(width: 8)); final idx = buttonIndex; buttons.add( FocusableButton( diff --git a/lib/screens/livetv/tabs/guide_tab.dart b/lib/screens/livetv/tabs/guide_tab.dart index a0831cf7..7ead5af7 100644 --- a/lib/screens/livetv/tabs/guide_tab.dart +++ b/lib/screens/livetv/tabs/guide_tab.dart @@ -6,6 +6,7 @@ import 'package:material_symbols_icons/symbols.dart'; import 'package:provider/provider.dart'; import '../../../focus/dpad_navigator.dart'; +import '../../../focus/input_mode_tracker.dart'; import '../../../focus/key_event_utils.dart'; import '../../../i18n/strings.g.dart'; import '../../../models/livetv_channel.dart'; @@ -68,6 +69,7 @@ class GuideTabState extends State { /// Focus into the guide content (called from tab bar navigation or initial load). void focusContent() { + if (!InputModeTracker.isKeyboardMode(context)) return; // If still loading programs, defer until the Focus widget is in the tree. if (_isLoading) { _pendingFocus = true; @@ -999,16 +1001,16 @@ class GuideTabState extends State { if (isFocused) { materialColor = theme.colorScheme.primary.withValues(alpha: 0.25); } else if (isCurrentlyAiring) { - materialColor = theme.colorScheme.primaryContainer; + materialColor = theme.colorScheme.onSurface; } else { - materialColor = theme.colorScheme.surfaceContainerHigh; + materialColor = theme.colorScheme.onSurface.withValues(alpha: 0.12); } Color titleColor; if (isFocused) { titleColor = theme.colorScheme.primary; } else if (isCurrentlyAiring) { - titleColor = theme.colorScheme.onPrimaryContainer; + titleColor = theme.colorScheme.surface; } else { titleColor = theme.colorScheme.onSurface; } @@ -1017,7 +1019,7 @@ class GuideTabState extends State { if (isFocused) { subtitleColor = theme.colorScheme.primary.withValues(alpha: 0.7); } else if (isCurrentlyAiring) { - subtitleColor = theme.colorScheme.onPrimaryContainer.withValues(alpha: 0.7); + subtitleColor = theme.colorScheme.surface.withValues(alpha: 0.7); } else { subtitleColor = theme.colorScheme.onSurfaceVariant; } @@ -1027,12 +1029,10 @@ class GuideTabState extends State { child: Material( color: materialColor, shape: RoundedRectangleBorder( - borderRadius: const BorderRadius.all(Radius.circular(4)), side: isFocused ? BorderSide(color: theme.colorScheme.primary, width: 2) : BorderSide.none, ), child: InkWell( canRequestFocus: false, - borderRadius: const BorderRadius.all(Radius.circular(4)), onTap: () => _showProgramDetails(channel, program), child: Container( decoration: BoxDecoration(