feat: Improve design

This commit is contained in:
Christian Pauly 2020-09-20 14:14:46 +02:00
parent 9cccd07643
commit c8a63c6d9d
3 changed files with 30 additions and 24 deletions

View File

@ -30,6 +30,7 @@ class PresenceListItem extends StatelessWidget {
Matrix.of(context).client.presences[room.directChatMatrixID]; Matrix.of(context).client.presences[room.directChatMatrixID];
final hasStatus = presence?.presence?.statusMsg != null; final hasStatus = presence?.presence?.statusMsg != null;
return InkWell( return InkWell(
borderRadius: BorderRadius.circular(8),
onTap: () => presence?.presence?.statusMsg == null onTap: () => presence?.presence?.statusMsg == null
? _startChatAction(context, user.id) ? _startChatAction(context, user.id)
: showDialog( : showDialog(
@ -41,10 +42,10 @@ class PresenceListItem extends StatelessWidget {
), ),
), ),
child: Container( child: Container(
width: 80, width: 76,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox(height: 16), SizedBox(height: 10),
Container( Container(
child: Stack( child: Stack(
children: [ children: [

View File

@ -289,7 +289,7 @@ class _ChatListState extends State<ChatList> {
), ),
), ),
appBar: AppBar( appBar: AppBar(
//elevation: _scrolledToTop ? 0 : null, elevation: _scrolledToTop ? 0 : null,
leading: selectMode != SelectMode.share leading: selectMode != SelectMode.share
? null ? null
: IconButton( : IconButton(
@ -303,23 +303,28 @@ class _ChatListState extends State<ChatList> {
: Padding( : Padding(
padding: padding:
EdgeInsets.only(top: 8, bottom: 8, right: 8), EdgeInsets.only(top: 8, bottom: 8, right: 8),
child: TextField( child: Material(
autocorrect: false, color: Theme.of(context).secondaryHeaderColor,
controller: searchController, borderRadius: BorderRadius.circular(32),
focusNode: _searchFocusNode, child: TextField(
decoration: InputDecoration( autocorrect: false,
contentPadding: EdgeInsets.all(9), controller: searchController,
border: InputBorder.none, focusNode: _searchFocusNode,
hintText: L10n.of(context).searchForAChat, decoration: InputDecoration(
suffixIcon: searchMode contentPadding: EdgeInsets.symmetric(
? IconButton( vertical: 9, horizontal: 16),
icon: Icon(Icons.backspace), border: InputBorder.none,
onPressed: () => setState(() { hintText: L10n.of(context).searchForAChat,
searchController.clear(); suffixIcon: searchMode
_searchFocusNode.unfocus(); ? IconButton(
}), icon: Icon(Icons.backspace),
) onPressed: () => setState(() {
: null, searchController.clear();
_searchFocusNode.unfocus();
}),
)
: null,
),
), ),
), ),
), ),
@ -434,9 +439,9 @@ class _ChatListState extends State<ChatList> {
? Container() ? Container()
: PreferredSize( : PreferredSize(
preferredSize: preferredSize:
Size.fromHeight(90), Size.fromHeight(82),
child: Container( child: Container(
height: 82, height: 78,
child: child:
ListView.builder( ListView.builder(
scrollDirection: scrollDirection:

View File

@ -3,16 +3,16 @@ import 'package:fluffychat/components/adaptive_page_layout.dart';
import 'package:fluffychat/components/avatar.dart'; import 'package:fluffychat/components/avatar.dart';
import 'package:fluffychat/components/dialogs/simple_dialogs.dart'; import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
import 'package:fluffychat/l10n/l10n.dart'; import 'package:fluffychat/l10n/l10n.dart';
import 'package:fluffychat/views/settings.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../components/matrix.dart'; import '../components/matrix.dart';
import 'chat_list.dart';
class SettingsIgnoreListView extends StatelessWidget { class SettingsIgnoreListView extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AdaptivePageLayout( return AdaptivePageLayout(
primaryPage: FocusPage.SECOND, primaryPage: FocusPage.SECOND,
firstScaffold: Settings(), firstScaffold: ChatList(),
secondScaffold: SettingsIgnoreList(), secondScaffold: SettingsIgnoreList(),
); );
} }