diff --git a/lib/pages/chat_list/chat_list_body.dart b/lib/pages/chat_list/chat_list_body.dart index ecab95ec..f25dee81 100644 --- a/lib/pages/chat_list/chat_list_body.dart +++ b/lib/pages/chat_list/chat_list_body.dart @@ -181,12 +181,10 @@ class _ChatListViewBodyState extends State { radius: Avatar.defaultSize / 2, child: const Icon(Icons.enhanced_encryption_outlined), - backgroundColor: Theme.of(context) - .colorScheme - .secondaryContainer, - foregroundColor: Theme.of(context) - .colorScheme - .onSecondaryContainer, + backgroundColor: + Theme.of(context).colorScheme.surfaceVariant, + foregroundColor: + Theme.of(context).colorScheme.onSurfaceVariant, ), title: Text( (Matrix.of(context) diff --git a/lib/pages/chat_list/chat_list_header.dart b/lib/pages/chat_list/chat_list_header.dart index a66d78af..888fa6e2 100644 --- a/lib/pages/chat_list/chat_list_header.dart +++ b/lib/pages/chat_list/chat_list_header.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:vrouter/vrouter.dart'; +import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/pages/chat_list/chat_list.dart'; import 'package:fluffychat/pages/chat_list/client_chooser_button.dart'; import 'package:fluffychat/widgets/matrix.dart'; @@ -18,6 +19,7 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget { return AppBar( automaticallyImplyLeading: false, + scrolledUnderElevation: selectMode == SelectMode.normal ? 0 : null, leading: selectMode == SelectMode.normal ? null : IconButton( @@ -36,26 +38,31 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget { controller.selectedRoomIds.length.toString(), key: const ValueKey(SelectMode.select), ) - : SizedBox( - height: 44, + : Material( + color: Theme.of(context).brightness == Brightness.light + ? Colors.white + : Colors.black, + borderRadius: const BorderRadius.only( + topLeft: Radius.circular(AppConfig.borderRadius), + topRight: Radius.circular(AppConfig.borderRadius), + ), + elevation: 6, + shadowColor: Theme.of(context).dividerColor.withAlpha(100), child: TextField( controller: controller.searchController, textInputAction: TextInputAction.search, onChanged: controller.onSearchEnter, decoration: InputDecoration( - fillColor: Theme.of(context).colorScheme.surfaceVariant, - contentPadding: EdgeInsets.zero, - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(90), - borderSide: BorderSide.none, - ), + border: const UnderlineInputBorder( + borderSide: BorderSide.none), + filled: false, hintText: controller.activeSpacesEntry.getName(context), prefixIcon: controller.isSearchMode ? IconButton( tooltip: L10n.of(context)!.cancel, icon: const Icon(Icons.close_outlined), onPressed: controller.cancelSearch, - color: Theme.of(context).colorScheme.primary, + color: Theme.of(context).colorScheme.onBackground, ) : IconButton( onPressed: Scaffold.of(context).openDrawer, diff --git a/lib/pages/chat_list/stories_header.dart b/lib/pages/chat_list/stories_header.dart index 8ef8556e..6b43e4d9 100644 --- a/lib/pages/chat_list/stories_header.dart +++ b/lib/pages/chat_list/stories_header.dart @@ -119,7 +119,7 @@ class StoriesHeader extends StatelessWidget { ...client.storiesRooms..remove(ownStoryRoom), ]; return SizedBox( - height: 98, + height: 96, child: ListView.builder( padding: const EdgeInsets.symmetric(horizontal: 12), scrollDirection: Axis.horizontal, diff --git a/lib/utils/string_color.dart b/lib/utils/string_color.dart index 4ed39432..fb11afdf 100644 --- a/lib/utils/string_color.dart +++ b/lib/utils/string_color.dart @@ -25,6 +25,6 @@ extension StringColor on String { number += codeUnitAt(i); } number = (number % 12) * 25.5; - return HSLColor.fromAHSL(1, number, 1, 0.8).toColor(); + return HSLColor.fromAHSL(1, number, 1, 0.7).toColor(); } } diff --git a/lib/widgets/avatar.dart b/lib/widgets/avatar.dart index 0d90f31d..708ea016 100644 --- a/lib/widgets/avatar.dart +++ b/lib/widgets/avatar.dart @@ -48,7 +48,7 @@ class Avatar extends StatelessWidget { child: Text( fallbackLetters, style: TextStyle( - color: noPic ? name?.darkColor : null, + color: noPic ? Colors.white : null, fontSize: fontSize, ), ),