#437 tv: fixes
This commit is contained in:
parent
207e8cd545
commit
7fb4e398a0
8 changed files with 24 additions and 4 deletions
|
@ -513,6 +513,7 @@ class _CollectionScrollViewState extends State<_CollectionScrollView> with Widge
|
||||||
: const SectionedListSliver<AvesEntry>(),
|
: const SectionedListSliver<AvesEntry>(),
|
||||||
const NavBarPaddingSliver(),
|
const NavBarPaddingSliver(),
|
||||||
const BottomPaddingSliver(),
|
const BottomPaddingSliver(),
|
||||||
|
const TvTileGridBottomPaddingSliver(),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
import 'package:aves/model/device.dart';
|
||||||
import 'package:aves/widgets/common/extensions/media_query.dart';
|
import 'package:aves/widgets/common/extensions/media_query.dart';
|
||||||
|
import 'package:aves/widgets/common/tile_extent_controller.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
@ -113,3 +115,16 @@ class BottomPaddingSliver extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class TvTileGridBottomPaddingSliver extends StatelessWidget {
|
||||||
|
const TvTileGridBottomPaddingSliver({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SliverToBoxAdapter(
|
||||||
|
child: SizedBox(
|
||||||
|
height: device.isTelevision ? context.select<TileExtentController, double>((controller) => controller.spacing) : 0,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'dart:math';
|
||||||
import 'package:aves/app_mode.dart';
|
import 'package:aves/app_mode.dart';
|
||||||
import 'package:aves/model/actions/chip_actions.dart';
|
import 'package:aves/model/actions/chip_actions.dart';
|
||||||
import 'package:aves/model/covers.dart';
|
import 'package:aves/model/covers.dart';
|
||||||
|
import 'package:aves/model/device.dart';
|
||||||
import 'package:aves/model/filters/album.dart';
|
import 'package:aves/model/filters/album.dart';
|
||||||
import 'package:aves/model/filters/filters.dart';
|
import 'package:aves/model/filters/filters.dart';
|
||||||
import 'package:aves/model/filters/location.dart';
|
import 'package:aves/model/filters/location.dart';
|
||||||
|
@ -59,9 +60,10 @@ class AvesFilterChip extends StatefulWidget {
|
||||||
static const double minChipHeight = kMinInteractiveDimension;
|
static const double minChipHeight = kMinInteractiveDimension;
|
||||||
static const double minChipWidth = 80;
|
static const double minChipWidth = 80;
|
||||||
static const double iconSize = 18;
|
static const double iconSize = 18;
|
||||||
static const double fontSize = 14;
|
|
||||||
static const double decoratedContentVerticalPadding = 5;
|
static const double decoratedContentVerticalPadding = 5;
|
||||||
|
|
||||||
|
static double get fontSize => device.isTelevision ? 18 : 14;
|
||||||
|
|
||||||
const AvesFilterChip({
|
const AvesFilterChip({
|
||||||
super.key,
|
super.key,
|
||||||
required this.filter,
|
required this.filter,
|
||||||
|
|
|
@ -306,7 +306,7 @@ class _TagCount extends StatelessWidget {
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'$count',
|
'$count',
|
||||||
style: const TextStyle(fontSize: AvesFilterChip.fontSize),
|
style: TextStyle(fontSize: AvesFilterChip.fontSize),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ class AlbumChipSetActionDelegate extends ChipSetActionDelegate<AlbumFilter> with
|
||||||
}) {
|
}) {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case ChipSetAction.createAlbum:
|
case ChipSetAction.createAlbum:
|
||||||
return appMode == AppMode.main && !isSelecting;
|
return !device.isReadOnly && appMode == AppMode.main && !isSelecting;
|
||||||
case ChipSetAction.delete:
|
case ChipSetAction.delete:
|
||||||
case ChipSetAction.rename:
|
case ChipSetAction.rename:
|
||||||
return !device.isReadOnly && appMode == AppMode.main && isSelecting;
|
return !device.isReadOnly && appMode == AppMode.main && isSelecting;
|
||||||
|
|
|
@ -664,6 +664,7 @@ class _FilterScrollView<T extends CollectionFilter> extends StatelessWidget {
|
||||||
}),
|
}),
|
||||||
const NavBarPaddingSliver(),
|
const NavBarPaddingSliver(),
|
||||||
const BottomPaddingSliver(),
|
const BottomPaddingSliver(),
|
||||||
|
const TvTileGridBottomPaddingSliver(),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class ViewerSection extends SettingsSection {
|
||||||
FutureOr<List<SettingsTile>> tiles(BuildContext context) async {
|
FutureOr<List<SettingsTile>> tiles(BuildContext context) async {
|
||||||
final canSetCutoutMode = await windowService.canSetCutoutMode();
|
final canSetCutoutMode = await windowService.canSetCutoutMode();
|
||||||
return [
|
return [
|
||||||
SettingsTileViewerQuickActions(),
|
if (!device.isTelevision) SettingsTileViewerQuickActions(),
|
||||||
SettingsTileViewerOverlay(),
|
SettingsTileViewerOverlay(),
|
||||||
SettingsTileViewerSlideshow(),
|
SettingsTileViewerSlideshow(),
|
||||||
if (!device.isTelevision) SettingsTileViewerGestureSideTapNext(),
|
if (!device.isTelevision) SettingsTileViewerGestureSideTapNext(),
|
||||||
|
|
|
@ -14,6 +14,7 @@ class SlideshowButtons extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
// TODO TLAD [tv] action buttons
|
||||||
const padding = ViewerButtonRowContent.padding;
|
const padding = ViewerButtonRowContent.padding;
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
Loading…
Reference in a new issue