From 7a85176fb2daffa066bdada47a9c5169f830a2c1 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Thu, 1 Jan 2026 08:56:33 +0100 Subject: [PATCH] match tab bar color of current container; show private icon in address bar; --- .../browser_modules/app_bar_title.dart | 8 ++++++ .../browser_modules/bottom_app_bar.dart | 10 ++++--- .../widgets/tab_view/tab_preview.dart | 27 ++++++------------- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/app_bar_title.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/app_bar_title.dart index 3043a61b..c7705512 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/app_bar_title.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/app_bar_title.dart @@ -106,6 +106,14 @@ class AppBarTitle extends HookConsumerWidget { ], icon, const SizedBox(width: 4), + if (tabState.isPrivate) ...[ + const Icon( + MdiIcons.dominoMask, + color: Color(0xFF8000D7), + size: 14, + ), + const SizedBox(width: 4), + ], Expanded( child: UriBreadcrumb( uri: tabState.url, diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/bottom_app_bar.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/bottom_app_bar.dart index 61636f69..eee5e4e5 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/bottom_app_bar.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/bottom_app_bar.dart @@ -47,6 +47,7 @@ import 'package:weblibre/features/geckoview/features/browser/presentation/widget import 'package:weblibre/features/geckoview/features/history/domain/repositories/history.dart'; import 'package:weblibre/features/geckoview/features/readerview/presentation/controllers/readerable.dart'; import 'package:weblibre/features/geckoview/features/readerview/presentation/widgets/reader_button.dart'; +import 'package:weblibre/features/geckoview/features/tabs/domain/providers/selected_container.dart'; import 'package:weblibre/features/tor/domain/services/tor_proxy.dart'; import 'package:weblibre/features/user/data/models/general_settings.dart'; import 'package:weblibre/features/user/domain/providers.dart'; @@ -179,8 +180,9 @@ class BrowserTabBar extends HookConsumerWidget { final trippleDotMenuController = useMenuController(); final selectedTabId = ref.watch(selectedTabProvider); - final isPrivateTab = ref.watch( - selectedTabStateProvider.select((state) => state?.isPrivate ?? false), + + final containerColor = ref.watch( + selectedContainerDataProvider.select((data) => data.value?.color), ); final showExtensionShortcut = ref.watch( @@ -260,8 +262,8 @@ class BrowserTabBar extends HookConsumerWidget { automaticallyImplyLeading: false, titleSpacing: 8.0, backgroundColor: - (isPrivateTab && displayedSheet is! ViewTabsSheet) - ? const Color(0x648000D7) + (containerColor != null && displayedSheet is! ViewTabsSheet) + ? containerColor.withValues(alpha: 0.33) : null, title: (selectedTabId != null && displayedSheet is! ViewTabsSheet) 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 897c80c8..61de1ad1 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 @@ -301,6 +301,14 @@ class ListTabPreview extends HookConsumerWidget { ), subtitle: Row( children: [ + if (tabState.isPrivate) ...[ + const Icon( + MdiIcons.dominoMask, + color: Color(0xFF8000D7), + size: 14, + ), + const SizedBox(width: 4), + ], Expanded( child: UriBreadcrumb( uri: tabState.url, @@ -309,25 +317,6 @@ class ListTabPreview extends HookConsumerWidget { ), ), ), - if (tabState.isPrivate) ...[ - const SizedBox(width: 6.0), - const SizedBox( - height: 16, - width: 24, - child: Stack( - fit: StackFit.expand, - children: [ - Positioned( - top: -4, - child: Icon( - MdiIcons.dominoMask, - color: Color(0xFF8000D7), - ), - ), - ], - ), - ), - ], ], ), ),