From 2395ce4d75b9153430015760b489795ee12e58cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Apitzsch?= Date: Wed, 12 Nov 2025 15:46:20 +0100 Subject: [PATCH] Apply background to images in question details for transparent images to be better visible in dark mode (also apply theme color as background color) --- lib/widgets/gallery_viewer.dart | 8 ++++++++ lib/widgets/question_inputs/list_input.dart | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/widgets/gallery_viewer.dart b/lib/widgets/gallery_viewer.dart index 747f5681..622c181e 100644 --- a/lib/widgets/gallery_viewer.dart +++ b/lib/widgets/gallery_viewer.dart @@ -40,6 +40,10 @@ class GalleryViewer extends StatelessWidget { tag: imagesKeys[index], child: Image.asset( images[index], + // Static background color for better visibility of illustrations + // with transparency, especially in dark mode + colorBlendMode: BlendMode.dstOver, + color: Theme.of(context).colorScheme.onPrimary, errorBuilder: (context, _, _) { return Image.asset( 'assets/images/placeholder_image.png', @@ -201,6 +205,10 @@ class _GalleryNavigatorState extends State { tag: widget.imagesKeys[index], child: Image.asset( widget.images[index], + // Static background color for better visibility of illustrations + // with transparency, especially in dark mode + colorBlendMode: BlendMode.dstOver, + color: Theme.of(context).colorScheme.onPrimary, errorBuilder: (context, _, _) { return Image.asset( 'assets/images/placeholder_image.png', diff --git a/lib/widgets/question_inputs/list_input.dart b/lib/widgets/question_inputs/list_input.dart index 70ae0372..c55ee7bb 100644 --- a/lib/widgets/question_inputs/list_input.dart +++ b/lib/widgets/question_inputs/list_input.dart @@ -183,7 +183,7 @@ class _ListInputItemState extends State with SingleTickerProvider // Static background color for better visibility of illustrations // with transparency, especially in dark mode colorBlendMode: BlendMode.dstOver, - color: Colors.grey.shade100, + color: Theme.of(context).colorScheme.onPrimary, height: 90, errorBuilder: (context, _, _) { return Image.asset(