mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-20 02:59:26 +01:00
chore: Adjust design
This commit is contained in:
parent
64459c1304
commit
3c7926c81a
@ -164,7 +164,7 @@ class ChatView extends StatelessWidget {
|
|||||||
builder: (BuildContext context, snapshot) {
|
builder: (BuildContext context, snapshot) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
elevation: 4,
|
elevation: 2,
|
||||||
actionsIconTheme: IconThemeData(
|
actionsIconTheme: IconThemeData(
|
||||||
color: controller.selectedEvents.isEmpty
|
color: controller.selectedEvents.isEmpty
|
||||||
? null
|
? null
|
||||||
|
@ -36,70 +36,74 @@ 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).colorScheme.surfaceVariant,
|
onChanged: controller.onSearchEnter,
|
||||||
contentPadding: EdgeInsets.zero,
|
decoration: InputDecoration(
|
||||||
border: OutlineInputBorder(
|
fillColor: Theme.of(context).colorScheme.surfaceVariant,
|
||||||
borderRadius: BorderRadius.circular(90),
|
contentPadding: EdgeInsets.zero,
|
||||||
borderSide: BorderSide.none,
|
border: OutlineInputBorder(
|
||||||
),
|
borderRadius: BorderRadius.circular(90),
|
||||||
hintText: controller.activeSpacesEntry.getName(context),
|
borderSide: BorderSide.none,
|
||||||
prefixIcon: controller.isSearchMode
|
),
|
||||||
? IconButton(
|
hintText: controller.activeSpacesEntry.getName(context),
|
||||||
tooltip: L10n.of(context)!.cancel,
|
prefixIcon: controller.isSearchMode
|
||||||
icon: const Icon(Icons.close_outlined),
|
? IconButton(
|
||||||
onPressed: controller.cancelSearch,
|
tooltip: L10n.of(context)!.cancel,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
icon: const Icon(Icons.close_outlined),
|
||||||
)
|
onPressed: controller.cancelSearch,
|
||||||
: IconButton(
|
color: Theme.of(context).colorScheme.primary,
|
||||||
onPressed: Scaffold.of(context).openDrawer,
|
)
|
||||||
icon: Icon(
|
: IconButton(
|
||||||
Icons.menu,
|
onPressed: Scaffold.of(context).openDrawer,
|
||||||
color: Theme.of(context).colorScheme.onBackground,
|
icon: Icon(
|
||||||
|
Icons.menu,
|
||||||
|
color:
|
||||||
|
Theme.of(context).colorScheme.onBackground,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
suffixIcon: Row(
|
||||||
suffixIcon: Row(
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisSize: MainAxisSize.min,
|
children: controller.isSearchMode
|
||||||
children: controller.isSearchMode
|
? [
|
||||||
? [
|
if (controller.isSearching)
|
||||||
if (controller.isSearching)
|
const CircularProgressIndicator.adaptive(
|
||||||
const CircularProgressIndicator.adaptive(
|
strokeWidth: 2,
|
||||||
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,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
TextButton(
|
]
|
||||||
onPressed: controller.setServer,
|
: [
|
||||||
style: TextButton.styleFrom(
|
IconButton(
|
||||||
textStyle: const TextStyle(fontSize: 12),
|
icon: Icon(
|
||||||
|
Icons.camera_alt_outlined,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onBackground,
|
||||||
|
),
|
||||||
|
tooltip: L10n.of(context)!.addToStory,
|
||||||
|
onPressed: () =>
|
||||||
|
VRouter.of(context).to('/stories/create'),
|
||||||
),
|
),
|
||||||
child: Text(
|
ClientChooserButton(controller),
|
||||||
controller.searchServer ??
|
const SizedBox(width: 12),
|
||||||
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),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -157,9 +157,9 @@ class ChatListItem extends StatelessWidget {
|
|||||||
: 0.0;
|
: 0.0;
|
||||||
return Material(
|
return Material(
|
||||||
color: selected
|
color: selected
|
||||||
? Theme.of(context).primaryColor.withAlpha(100)
|
? Theme.of(context).colorScheme.primaryContainer
|
||||||
: activeChat
|
: activeChat
|
||||||
? Theme.of(context).secondaryHeaderColor
|
? Theme.of(context).colorScheme.secondaryContainer
|
||||||
: Colors.transparent,
|
: Colors.transparent,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
selected: selected || activeChat,
|
selected: selected || activeChat,
|
||||||
|
Loading…
Reference in New Issue
Block a user