Merge branch 'krille/minor-design-fixes' into 'master'
Minor design fixes See merge request ChristianPauly/fluffychat-flutter!95
This commit is contained in:
commit
d9b1510460
|
@ -44,19 +44,34 @@ class PresenceListItem extends StatelessWidget {
|
|||
child: Column(
|
||||
children: <Widget>[
|
||||
SizedBox(height: 16),
|
||||
Avatar(user.avatarUrl, user.calcDisplayname()),
|
||||
Container(
|
||||
child: Avatar(user.avatarUrl, user.calcDisplayname()),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1,
|
||||
color: presence?.presence?.statusMsg == null
|
||||
? presence?.presence?.currentlyActive == true
|
||||
? Colors.blue
|
||||
: Theme.of(context).secondaryHeaderColor
|
||||
: Theme.of(context).primaryColor,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(80),
|
||||
),
|
||||
padding: EdgeInsets.all(2),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 6.0, top: 6.0, right: 6.0),
|
||||
padding: const EdgeInsets.only(left: 6.0, top: 0.0, right: 6.0),
|
||||
child: Text(
|
||||
user.calcDisplayname(),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
user.calcDisplayname().trim().split(' ').first,
|
||||
overflow: TextOverflow.clip,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
color: Color(0xFF555555),
|
||||
color: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyText2
|
||||
.color
|
||||
.withOpacity(0.66),
|
||||
fontSize: 13,
|
||||
fontWeight: presence?.presence?.statusMsg == null
|
||||
? null
|
||||
: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -51,6 +51,7 @@ class ChatList extends StatefulWidget {
|
|||
class _ChatListState extends State<ChatList> {
|
||||
bool get searchMode => searchController.text?.isNotEmpty ?? false;
|
||||
final TextEditingController searchController = TextEditingController();
|
||||
final FocusNode _searchFocusNode = FocusNode();
|
||||
Timer coolDown;
|
||||
PublicRoomsResponse publicRoomsResponse;
|
||||
bool loadingPublicRooms = false;
|
||||
|
@ -303,10 +304,20 @@ class _ChatListState extends State<ChatList> {
|
|||
child: TextField(
|
||||
autocorrect: false,
|
||||
controller: searchController,
|
||||
focusNode: _searchFocusNode,
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.all(9),
|
||||
border: InputBorder.none,
|
||||
hintText: L10n.of(context).searchForAChat,
|
||||
suffixIcon: searchMode
|
||||
? IconButton(
|
||||
icon: Icon(Icons.backspace),
|
||||
onPressed: () => setState(() {
|
||||
searchController.clear();
|
||||
_searchFocusNode.unfocus();
|
||||
}),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue