mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-25 10:50:40 +01:00
chore: Make header bar in chat list thinner
This commit is contained in:
parent
06b232bad0
commit
c31411ce33
@ -37,80 +37,85 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
controller.selectedRoomIds.length.toString(),
|
controller.selectedRoomIds.length.toString(),
|
||||||
key: const ValueKey(SelectMode.select),
|
key: const ValueKey(SelectMode.select),
|
||||||
)
|
)
|
||||||
: TextField(
|
: SizedBox(
|
||||||
controller: controller.searchController,
|
height: 44,
|
||||||
textInputAction: TextInputAction.search,
|
child: TextField(
|
||||||
onChanged: controller.onSearchEnter,
|
controller: controller.searchController,
|
||||||
decoration: InputDecoration(
|
textInputAction: TextInputAction.search,
|
||||||
fillColor: Theme.of(context)
|
onChanged: controller.onSearchEnter,
|
||||||
.colorScheme
|
decoration: InputDecoration(
|
||||||
.secondaryContainer
|
fillColor: Theme.of(context)
|
||||||
.withAlpha(128),
|
.colorScheme
|
||||||
border: UnderlineInputBorder(
|
.secondaryContainer
|
||||||
borderSide: BorderSide.none,
|
.withAlpha(128),
|
||||||
borderRadius:
|
border: UnderlineInputBorder(
|
||||||
BorderRadius.circular(AppConfig.borderRadius),
|
borderSide: BorderSide.none,
|
||||||
),
|
borderRadius:
|
||||||
hintText: controller.activeSpacesEntry.getName(context),
|
BorderRadius.circular(AppConfig.borderRadius),
|
||||||
prefixIcon: Padding(
|
|
||||||
padding: const EdgeInsets.only(
|
|
||||||
left: 8.0,
|
|
||||||
right: 4,
|
|
||||||
),
|
),
|
||||||
child: controller.isSearchMode
|
hintText: controller.activeSpacesEntry.getName(context),
|
||||||
? IconButton(
|
prefixIcon: Padding(
|
||||||
tooltip: L10n.of(context)!.cancel,
|
padding: const EdgeInsets.only(
|
||||||
icon: const Icon(Icons.close_outlined),
|
left: 8.0,
|
||||||
onPressed: controller.cancelSearch,
|
right: 4,
|
||||||
color: Theme.of(context).colorScheme.onBackground,
|
),
|
||||||
)
|
child: controller.isSearchMode
|
||||||
: IconButton(
|
? IconButton(
|
||||||
onPressed: Scaffold.of(context).openDrawer,
|
tooltip: L10n.of(context)!.cancel,
|
||||||
icon: Icon(
|
icon: const Icon(Icons.close_outlined),
|
||||||
Icons.menu,
|
onPressed: controller.cancelSearch,
|
||||||
color:
|
color:
|
||||||
Theme.of(context).colorScheme.onBackground,
|
Theme.of(context).colorScheme.onBackground,
|
||||||
),
|
)
|
||||||
),
|
: IconButton(
|
||||||
),
|
onPressed: Scaffold.of(context).openDrawer,
|
||||||
suffixIcon: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: controller.isSearchMode
|
|
||||||
? [
|
|
||||||
if (controller.isSearching)
|
|
||||||
const CircularProgressIndicator.adaptive(
|
|
||||||
strokeWidth: 2,
|
|
||||||
),
|
|
||||||
TextButton(
|
|
||||||
onPressed: controller.setServer,
|
|
||||||
style: TextButton.styleFrom(
|
|
||||||
textStyle: const TextStyle(fontSize: 12),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
controller.searchServer ??
|
|
||||||
Matrix.of(context)
|
|
||||||
.client
|
|
||||||
.homeserver!
|
|
||||||
.host,
|
|
||||||
maxLines: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
: [
|
|
||||||
IconButton(
|
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.camera_alt_outlined,
|
Icons.menu,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.onBackground,
|
.onBackground,
|
||||||
),
|
),
|
||||||
tooltip: L10n.of(context)!.addToStory,
|
|
||||||
onPressed: () =>
|
|
||||||
VRouter.of(context).to('/stories/create'),
|
|
||||||
),
|
),
|
||||||
ClientChooserButton(controller),
|
),
|
||||||
const SizedBox(width: 12),
|
suffixIcon: Row(
|
||||||
],
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: controller.isSearchMode
|
||||||
|
? [
|
||||||
|
if (controller.isSearching)
|
||||||
|
const CircularProgressIndicator.adaptive(
|
||||||
|
strokeWidth: 2,
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: controller.setServer,
|
||||||
|
style: TextButton.styleFrom(
|
||||||
|
textStyle: const TextStyle(fontSize: 12),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
controller.searchServer ??
|
||||||
|
Matrix.of(context)
|
||||||
|
.client
|
||||||
|
.homeserver!
|
||||||
|
.host,
|
||||||
|
maxLines: 2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
: [
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.camera_alt_outlined,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onBackground,
|
||||||
|
),
|
||||||
|
tooltip: L10n.of(context)!.addToStory,
|
||||||
|
onPressed: () =>
|
||||||
|
VRouter.of(context).to('/stories/create'),
|
||||||
|
),
|
||||||
|
ClientChooserButton(controller),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user