chore: Adjust appbar design

This commit is contained in:
Christian Pauly 2022-07-12 19:39:18 +02:00
parent b9e72225f9
commit f39213ca9b
5 changed files with 23 additions and 18 deletions

View File

@ -181,12 +181,10 @@ class _ChatListViewBodyState extends State<ChatListViewBody> {
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)

View File

@ -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,

View File

@ -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,

View File

@ -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();
}
}

View File

@ -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,
),
),