chore: Small adjustment to poster colors

This commit is contained in:
PartyDonut 2025-10-12 23:10:31 +02:00
parent de972e6e7c
commit 66ffc8c112
6 changed files with 84 additions and 47 deletions

View file

@ -5,6 +5,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:iconsax_plus/iconsax_plus.dart';
import 'package:fladder/models/items/chapters_model.dart';
import 'package:fladder/theme.dart';
import 'package:fladder/util/adaptive_layout/adaptive_layout.dart';
import 'package:fladder/util/focus_provider.dart';
import 'package:fladder/util/humanize_duration.dart';
@ -59,42 +60,45 @@ class ChapterRow extends ConsumerWidget {
},
);
},
child: Card(
child: Container(
decoration: BoxDecoration(
borderRadius: FladderTheme.smallShape.borderRadius,
color: Theme.of(context).colorScheme.surfaceContainer,
),
foregroundDecoration: BoxDecoration(
borderRadius: FladderTheme.smallShape.borderRadius,
border: Border.all(width: 2, color: Colors.white.withAlpha(25)),
),
child: AspectRatio(
aspectRatio: 1.75,
child: Stack(
fit: StackFit.expand,
children: [
CachedNetworkImage(
imageUrl: chapter.imageUrl,
fit: BoxFit.cover,
placeholder: (context, url) => const Icon(IconsaxPlusBold.image),
),
Align(
alignment: Alignment.bottomLeft,
child: Padding(
padding: const EdgeInsets.all(5),
child: Card(
elevation: 0,
shadowColor: Colors.transparent,
color: Theme.of(context).cardColor.withValues(alpha: 0.4),
child: Padding(
padding: const EdgeInsets.all(5),
child: Text(
"${chapter.name} \n${chapter.startPosition.humanize ?? context.localized.start}",
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.bold),
),
),
),
),
),
],
child: CachedNetworkImage(
imageUrl: chapter.imageUrl,
fit: BoxFit.cover,
placeholder: (context, url) => const Icon(IconsaxPlusBold.image),
),
),
),
overlays: [
if (AdaptiveLayout.of(context).isDesktop)
Align(
alignment: Alignment.bottomLeft,
child: Padding(
padding: const EdgeInsets.all(5),
child: Container(
color: Theme.of(context).colorScheme.surfaceContainer,
child: Padding(
padding: const EdgeInsets.all(5),
child: Text(
"${chapter.name} \n${chapter.startPosition.humanize ?? context.localized.start}",
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontWeight: FontWeight.bold),
),
),
),
),
),
],
focusedOverlays: [
if (AdaptiveLayout.inputDeviceOf(context) == InputDevice.pointer)
ExcludeFocus(
child: Align(
alignment: Alignment.bottomRight,

View file

@ -78,7 +78,14 @@ class PosterImage extends ConsumerWidget {
onLongPress: () => _showBottomSheet(context, ref),
onSecondaryTapDown: (details) => _showContextMenu(context, ref, details.globalPosition),
child: Container(
color: Theme.of(context).cardColor,
decoration: BoxDecoration(
borderRadius: radius,
color: Theme.of(context).colorScheme.surfaceContainer,
),
foregroundDecoration: BoxDecoration(
borderRadius: radius,
border: Border.all(width: 2, color: Colors.white.withAlpha(25)),
),
child: FladderImage(
image: primaryPosters
? poster.images?.primary

View file

@ -7,6 +7,7 @@ import 'package:fladder/models/syncing/sync_item.dart';
import 'package:fladder/providers/settings/client_settings_provider.dart';
import 'package:fladder/providers/sync/sync_provider_helpers.dart';
import 'package:fladder/screens/syncing/sync_button.dart';
import 'package:fladder/theme.dart';
import 'package:fladder/util/adaptive_layout/adaptive_layout.dart';
import 'package:fladder/util/fladder_image.dart';
import 'package:fladder/util/focus_provider.dart';
@ -174,15 +175,25 @@ class EpisodePoster extends ConsumerWidget {
},
child: Hero(
tag: heroTag ?? UniqueKey(),
child: FladderImage(
image: !episodeAvailable ? episode.parentImages?.primary : episode.images?.primary,
placeHolder: placeHolder,
blurOnly: !episodeAvailable
? true
: ref.watch(clientSettingsProvider.select((value) => value.blurUpcomingEpisodes))
? blur
: false,
decodeHeight: 250,
child: Container(
decoration: BoxDecoration(
borderRadius: FladderTheme.smallShape.borderRadius,
color: Theme.of(context).colorScheme.surfaceContainer,
),
foregroundDecoration: BoxDecoration(
borderRadius: FladderTheme.smallShape.borderRadius,
border: Border.all(width: 2, color: Colors.white.withAlpha(25)),
),
child: FladderImage(
image: !episodeAvailable ? episode.parentImages?.primary : episode.images?.primary,
placeHolder: placeHolder,
blurOnly: !episodeAvailable
? true
: ref.watch(clientSettingsProvider.select((value) => value.blurUpcomingEpisodes))
? blur
: false,
decodeHeight: 250,
),
),
),
overlays: [

View file

@ -59,7 +59,11 @@ class PeopleRow extends ConsumerWidget {
child: Container(
decoration: BoxDecoration(
borderRadius: FladderTheme.smallShape.borderRadius,
color: Theme.of(context).cardTheme.color?.withValues(alpha: 0.1),
color: Theme.of(context).colorScheme.surfaceContainer,
),
foregroundDecoration: BoxDecoration(
borderRadius: FladderTheme.smallShape.borderRadius,
border: Border.all(width: 2, color: Colors.white.withAlpha(25)),
),
child: FocusButton(
onTap: () => Navigator.of(context).push(

View file

@ -5,6 +5,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:fladder/models/items/season_model.dart';
import 'package:fladder/providers/sync/sync_provider_helpers.dart';
import 'package:fladder/screens/syncing/sync_button.dart';
import 'package:fladder/theme.dart';
import 'package:fladder/util/adaptive_layout/adaptive_layout.dart';
import 'package:fladder/util/fladder_image.dart';
import 'package:fladder/util/focus_provider.dart';
@ -83,11 +84,21 @@ class SeasonPoster extends ConsumerWidget {
child: Hero(
tag: myKey,
child: FocusButton(
child: FladderImage(
image: season.getPosters?.primary ??
season.parentImages?.backDrop?.firstOrNull ??
season.parentImages?.primary,
placeHolder: placeHolder(season.name),
child: Container(
decoration: BoxDecoration(
borderRadius: FladderTheme.smallShape.borderRadius,
color: Theme.of(context).colorScheme.surfaceContainer,
),
foregroundDecoration: BoxDecoration(
borderRadius: FladderTheme.smallShape.borderRadius,
border: Border.all(width: 2, color: Colors.white.withAlpha(25)),
),
child: FladderImage(
image: season.getPosters?.primary ??
season.parentImages?.backDrop?.firstOrNull ??
season.parentImages?.primary,
placeHolder: placeHolder(season.name),
),
),
onSecondaryTapDown: (details) async {
Offset localPosition = details.globalPosition;