diff --git a/lib/src/theme_widgets/settings_service.dart b/lib/src/theme_widgets/settings_service.dart index af88659a..417dcfd8 100644 --- a/lib/src/theme_widgets/settings_service.dart +++ b/lib/src/theme_widgets/settings_service.dart @@ -55,15 +55,15 @@ class GnomeSettings { T? _updateValue(String key) { T? value; - try { - _settings.get(key).then((v) { - value = v.toNative() as T?; - if (_values[key] != value) { - _values[key] = value; - notifyListeners(); - } - }); - } on GSettingsUnknownKeyException catch (_) {} + _settings.get(key).then((v) { + value = v.toNative() as T?; + if (_values[key] != value) { + _values[key] = value; + notifyListeners(); + } + }).catchError((_) { + value = null; + }); return value; } diff --git a/lib/src/themes/common_themes.dart b/lib/src/themes/common_themes.dart index 03eea50e..7d3cf396 100644 --- a/lib/src/themes/common_themes.dart +++ b/lib/src/themes/common_themes.dart @@ -797,7 +797,7 @@ CardTheme _createCardTheme(ColorScheme colorScheme) { } Color _cardColor(ColorScheme colorScheme) => - colorScheme.surface.scale(lightness: colorScheme.isLight ? -0.1 : 0.08); + colorScheme.surface.scale(lightness: colorScheme.isLight ? -0.05 : 0.05); /// Helper function to create a new Yaru light theme ThemeData createYaruLightTheme({ diff --git a/lib/src/widgets/yaru_banner.dart b/lib/src/widgets/yaru_banner.dart index 2dd173a5..7558c4be 100644 --- a/lib/src/widgets/yaru_banner.dart +++ b/lib/src/widgets/yaru_banner.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:yaru/constants.dart'; import 'package:yaru/foundation.dart' show YaruBorderRadiusExtension; +import 'package:yaru/src/colors.dart'; import 'yaru_tile.dart'; @@ -88,10 +89,8 @@ class YaruBanner extends StatelessWidget { final theme = Theme.of(context); final borderRadius = BorderRadius.circular(kYaruBannerRadius); - final light = theme.brightness == Brightness.light; - - final defaultSurfaceTintColor = - light ? theme.cardColor : const Color.fromARGB(255, 126, 126, 126); + final defaultSurfaceTintColor = theme.scaffoldBackgroundColor + .scale(lightness: theme.brightness == Brightness.light ? 0 : 0.03); return Material( color: selected == true ? theme.primaryColor.withOpacity(0.8) @@ -104,7 +103,7 @@ class YaruBanner extends StatelessWidget { hoverColor: theme.colorScheme.onSurface.withOpacity(0.1), mouseCursor: mouseCursor, child: Card( - color: color, + color: color ?? defaultSurfaceTintColor, shadowColor: Colors.transparent, surfaceTintColor: surfaceTintColor ?? defaultSurfaceTintColor, elevation: elevation ?? 1,