From d561dec5e081982da3c174a49addfab2612ceffc Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Tue, 13 Jan 2026 19:07:42 +0100 Subject: [PATCH] fix color issues with new app colors --- app/lib/core/design/app_colors.dart | 9 +++++++++ .../browser/presentation/screens/browser.dart | 2 +- .../presentation/widgets/tab_view/tab_preview.dart | 13 +++++++------ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/lib/core/design/app_colors.dart b/app/lib/core/design/app_colors.dart index 4d03cf3d..a293213b 100644 --- a/app/lib/core/design/app_colors.dart +++ b/app/lib/core/design/app_colors.dart @@ -6,6 +6,7 @@ class AppColors extends ThemeExtension { this.seedColor = const Color(0xFF167C80), this.privateTabPurple = const Color(0xFF8000D7), this.privateTabBackground = const Color(0xFF25003E), + this.privateTabForeground = const Color(0xFFFFFFFF), this.privateSelectionOverlay = const Color(0x648000D7), this.torPurple = const Color(0xFF7D4698), this.torActiveGreen = const Color(0xFF68B030), @@ -15,6 +16,7 @@ class AppColors extends ThemeExtension { final Color seedColor; final Color privateTabPurple; final Color privateTabBackground; + final Color privateTabForeground; final Color privateSelectionOverlay; final Color torPurple; final Color torActiveGreen; @@ -28,6 +30,7 @@ class AppColors extends ThemeExtension { Color? seedColor, Color? privateTabPurple, Color? privateTabBackground, + Color? privateTabForeground, Color? privateSelectionOverlay, Color? torPurple, Color? torActiveGreen, @@ -37,6 +40,7 @@ class AppColors extends ThemeExtension { seedColor: seedColor ?? this.seedColor, privateTabPurple: privateTabPurple ?? this.privateTabPurple, privateTabBackground: privateTabBackground ?? this.privateTabBackground, + privateTabForeground: privateTabForeground ?? this.privateTabForeground, privateSelectionOverlay: privateSelectionOverlay ?? this.privateSelectionOverlay, torPurple: torPurple ?? this.torPurple, @@ -63,6 +67,11 @@ class AppColors extends ThemeExtension { other.privateTabBackground, t, )!, + privateTabForeground: Color.lerp( + privateTabForeground, + other.privateTabForeground, + t, + )!, privateSelectionOverlay: Color.lerp( privateSelectionOverlay, other.privateSelectionOverlay, diff --git a/app/lib/features/geckoview/features/browser/presentation/screens/browser.dart b/app/lib/features/geckoview/features/browser/presentation/screens/browser.dart index 3b726b91..464d7d1d 100644 --- a/app/lib/features/geckoview/features/browser/presentation/screens/browser.dart +++ b/app/lib/features/geckoview/features/browser/presentation/screens/browser.dart @@ -580,7 +580,7 @@ class _SheetContainer extends HookConsumerWidget { ref.read(bottomSheetControllerProvider.notifier).requestDismiss(); }, child: ColoredBox( - color: colorScheme.scrim, + color: colorScheme.scrim.withValues(alpha: 0.5), child: GestureDetector( onTap: () {}, // Prevent tap from propagating to parent child: Align( diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_preview.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_preview.dart index 7469b529..7442450f 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_preview.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_preview.dart @@ -26,7 +26,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:nullability/nullability.dart'; import 'package:weblibre/core/design/app_colors.dart'; import 'package:weblibre/features/geckoview/domain/entities/states/tab.dart'; -import 'package:weblibre/presentation/widgets/non_focusable.dart'; import 'package:weblibre/features/geckoview/domain/providers/tab_state.dart'; import 'package:weblibre/features/geckoview/domain/repositories/tab.dart'; import 'package:weblibre/features/geckoview/features/browser/presentation/widgets/tab_icon.dart'; @@ -34,6 +33,7 @@ import 'package:weblibre/features/geckoview/features/find_in_page/domain/entitie import 'package:weblibre/features/geckoview/features/find_in_page/presentation/controllers/find_in_page.dart'; import 'package:weblibre/features/geckoview/features/tabs/domain/repositories/tab.dart'; import 'package:weblibre/presentation/hooks/menu_controller.dart'; +import 'package:weblibre/presentation/widgets/non_focusable.dart'; import 'package:weblibre/presentation/widgets/uri_breadcrumb.dart'; import 'package:weblibre/utils/ui_helper.dart' as ui_helper; @@ -99,7 +99,6 @@ class GridTabPreview extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final colorScheme = Theme.of(context).colorScheme; final appColors = AppColors.of(context); final tabState = @@ -132,7 +131,7 @@ class GridTabPreview extends HookConsumerWidget { tabState.titleOrAuthority, maxLines: 2, style: tabState.isPrivate - ? TextStyle(color: colorScheme.onSurface) + ? TextStyle(color: appColors.privateTabForeground) : null, ), ), @@ -185,7 +184,9 @@ class GridTabPreview extends HookConsumerWidget { child: Text( tabState.url.authority, style: Theme.of(context).textTheme.bodySmall?.copyWith( - color: tabState.isPrivate ? colorScheme.onSurface : null, + color: tabState.isPrivate + ? appColors.privateTabForeground + : null, ), ), ), @@ -305,7 +306,7 @@ class ListTabPreview extends HookConsumerWidget { tabState.titleOrAuthority, maxLines: 2, style: tabState.isPrivate - ? TextStyle(color: colorScheme.onSurface) + ? TextStyle(color: appColors.privateTabForeground) : null, ), subtitle: Row( @@ -323,7 +324,7 @@ class ListTabPreview extends HookConsumerWidget { uri: tabState.url, style: Theme.of(context).textTheme.bodySmall?.copyWith( color: tabState.isPrivate - ? colorScheme.onSurface + ? appColors.privateTabForeground : null, ), ),