fix: reduce bottom sheet spacing
This commit is contained in:
@@ -81,10 +81,10 @@ class BottomSheetHeader extends StatelessWidget {
|
||||
}
|
||||
|
||||
// Determine the title style
|
||||
final effectiveTitleStyle = titleStyle ?? TextStyle(fontSize: 20, fontWeight: FontWeight.bold, color: titleColor);
|
||||
final effectiveTitleStyle = titleStyle ?? TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: titleColor);
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
decoration: showBorder
|
||||
? BoxDecoration(
|
||||
border: Border(bottom: BorderSide(color: Theme.of(context).dividerColor)),
|
||||
|
||||
@@ -55,6 +55,9 @@ class FocusableListTile extends StatefulWidget {
|
||||
/// An optional color for the icon of the list tile.
|
||||
final Color? iconColor;
|
||||
|
||||
/// Visual density for the list tile.
|
||||
final VisualDensity? visualDensity;
|
||||
|
||||
const FocusableListTile({
|
||||
super.key,
|
||||
this.title,
|
||||
@@ -63,7 +66,7 @@ class FocusableListTile extends StatefulWidget {
|
||||
this.trailing,
|
||||
this.onTap,
|
||||
this.onLongPress,
|
||||
this.dense = false,
|
||||
this.dense = true,
|
||||
this.enabled = true,
|
||||
this.selected = false,
|
||||
this.focusNode,
|
||||
@@ -73,6 +76,7 @@ class FocusableListTile extends StatefulWidget {
|
||||
this.hoverColor,
|
||||
this.textColor,
|
||||
this.iconColor,
|
||||
this.visualDensity = const VisualDensity(vertical: -3),
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -150,6 +154,7 @@ class _FocusableListTileState extends State<FocusableListTile> {
|
||||
enabled: widget.enabled,
|
||||
selected: widget.selected,
|
||||
contentPadding: widget.contentPadding,
|
||||
visualDensity: widget.visualDensity,
|
||||
focusNode: widget.suppressInitialSelect ? null : _effectiveFocusNode,
|
||||
autofocus: widget.suppressInitialSelect ? false : widget.autofocus,
|
||||
hoverColor: widget.hoverColor,
|
||||
@@ -209,16 +214,20 @@ class FocusableRadioListTile<T> extends StatefulWidget {
|
||||
/// Whether the radio tile is interactive.
|
||||
final bool? enabled;
|
||||
|
||||
/// Visual density for the list tile.
|
||||
final VisualDensity? visualDensity;
|
||||
|
||||
const FocusableRadioListTile({
|
||||
super.key,
|
||||
this.title,
|
||||
this.subtitle,
|
||||
this.secondary,
|
||||
required this.value,
|
||||
this.dense = false,
|
||||
this.dense = true,
|
||||
this.focusNode,
|
||||
this.autofocus = false,
|
||||
this.enabled,
|
||||
this.visualDensity = const VisualDensity(vertical: -3),
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -281,6 +290,7 @@ class _FocusableRadioListTileState<T> extends State<FocusableRadioListTile<T>> {
|
||||
value: widget.value,
|
||||
// groupValue and onChanged provided by RadioGroup ancestor
|
||||
dense: widget.dense,
|
||||
visualDensity: widget.visualDensity,
|
||||
focusNode: _effectiveFocusNode,
|
||||
autofocus: widget.autofocus,
|
||||
enabled: widget.enabled,
|
||||
@@ -316,6 +326,9 @@ class FocusableSwitchListTile extends StatefulWidget {
|
||||
/// Whether this tile should autofocus when first built.
|
||||
final bool autofocus;
|
||||
|
||||
/// Visual density for the list tile.
|
||||
final VisualDensity? visualDensity;
|
||||
|
||||
const FocusableSwitchListTile({
|
||||
super.key,
|
||||
this.title,
|
||||
@@ -323,9 +336,10 @@ class FocusableSwitchListTile extends StatefulWidget {
|
||||
this.secondary,
|
||||
required this.value,
|
||||
required this.onChanged,
|
||||
this.dense = false,
|
||||
this.dense = true,
|
||||
this.focusNode,
|
||||
this.autofocus = false,
|
||||
this.visualDensity = const VisualDensity(vertical: -3),
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -388,6 +402,7 @@ class _FocusableSwitchListTileState extends State<FocusableSwitchListTile> {
|
||||
value: widget.value,
|
||||
onChanged: widget.onChanged,
|
||||
dense: widget.dense,
|
||||
visualDensity: widget.visualDensity,
|
||||
focusNode: _effectiveFocusNode,
|
||||
autofocus: widget.autofocus,
|
||||
);
|
||||
|
||||
@@ -319,7 +319,7 @@ class _ColumnHeader extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 6),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
|
||||
@@ -383,7 +383,7 @@ class _VideoSettingsSheetState extends State<VideoSettingsSheet> {
|
||||
|
||||
// HDR Toggle (iOS, macOS, and Windows)
|
||||
if (Platform.isIOS || Platform.isMacOS || Platform.isWindows)
|
||||
ListTile(
|
||||
FocusableListTile(
|
||||
leading: AppIcon(Symbols.hdr_strong_rounded, fill: 1, color: _enableHDR ? Colors.amber : tokens(context).textMuted),
|
||||
title: Text(t.videoSettings.hdr),
|
||||
trailing: Switch(value: _enableHDR, onChanged: (_) => _toggleHDR(), activeThumbColor: Colors.amber),
|
||||
@@ -391,7 +391,7 @@ class _VideoSettingsSheetState extends State<VideoSettingsSheet> {
|
||||
),
|
||||
|
||||
// Auto-Play Next Episode Toggle
|
||||
ListTile(
|
||||
FocusableListTile(
|
||||
leading: AppIcon(
|
||||
Symbols.skip_next_rounded,
|
||||
fill: 1,
|
||||
@@ -429,7 +429,7 @@ class _VideoSettingsSheetState extends State<VideoSettingsSheet> {
|
||||
|
||||
// Audio Passthrough (Desktop only)
|
||||
if (isDesktop)
|
||||
ListTile(
|
||||
FocusableListTile(
|
||||
leading: AppIcon(
|
||||
Symbols.surround_sound_rounded,
|
||||
fill: 1,
|
||||
@@ -446,7 +446,7 @@ class _VideoSettingsSheetState extends State<VideoSettingsSheet> {
|
||||
|
||||
// Audio Normalization (MPV only)
|
||||
if (widget.player.playerType == 'mpv')
|
||||
ListTile(
|
||||
FocusableListTile(
|
||||
leading: AppIcon(
|
||||
Symbols.graphic_eq_rounded,
|
||||
fill: 1,
|
||||
@@ -473,7 +473,7 @@ class _VideoSettingsSheetState extends State<VideoSettingsSheet> {
|
||||
|
||||
// Ambient Lighting (MPV only)
|
||||
if (widget.onToggleAmbientLighting != null)
|
||||
ListTile(
|
||||
FocusableListTile(
|
||||
leading: AppIcon(
|
||||
Symbols.blur_on,
|
||||
fill: 1,
|
||||
@@ -495,7 +495,7 @@ class _VideoSettingsSheetState extends State<VideoSettingsSheet> {
|
||||
),
|
||||
|
||||
// Performance Overlay Toggle
|
||||
ListTile(
|
||||
FocusableListTile(
|
||||
leading: AppIcon(
|
||||
Symbols.analytics_rounded,
|
||||
fill: 1,
|
||||
|
||||
Reference in New Issue
Block a user