From c439a526dd42d0b2a0811397051616484eaddb32 Mon Sep 17 00:00:00 2001 From: Demizo <73141750+Demizo@users.noreply.github.com> Date: Thu, 1 Sep 2022 17:01:17 -0500 Subject: [PATCH 1/2] Fade Long Usernames on Sidebar Long usernames now fade out on the sidebar to make room for the settings button --- lib/components/Home/Sidebar.dart | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/components/Home/Sidebar.dart b/lib/components/Home/Sidebar.dart index df792eab..95e90e21 100644 --- a/lib/components/Home/Sidebar.dart +++ b/lib/components/Home/Sidebar.dart @@ -154,11 +154,19 @@ class Sidebar extends HookConsumerWidget { backgroundImage: CachedNetworkImageProvider(avatarImg), ), - const SizedBox(width: 10), - Text( - data.displayName ?? "Guest", - style: const TextStyle( - fontWeight: FontWeight.bold, + const SizedBox( + width: 10, + ), + SizedBox( + width: 120, + child: Text( + data.displayName ?? "Guest", + maxLines: 1, + softWrap: false, + overflow: TextOverflow.fade, + style: const TextStyle( + fontWeight: FontWeight.bold, + ), ), ), ], From 0ae0e196fdd6e8ae3e47f61be18673ea3c20383c Mon Sep 17 00:00:00 2001 From: Demizo <73141750+Demizo@users.noreply.github.com> Date: Thu, 1 Sep 2022 23:37:14 -0500 Subject: [PATCH 2/2] Username and Icon now flexible Nested username and icon within a flexible box --- lib/components/Home/Sidebar.dart | 43 +++++++++++++++++--------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/lib/components/Home/Sidebar.dart b/lib/components/Home/Sidebar.dart index 95e90e21..04201043 100644 --- a/lib/components/Home/Sidebar.dart +++ b/lib/components/Home/Sidebar.dart @@ -148,28 +148,31 @@ class Sidebar extends HookConsumerWidget { child: CircularProgressIndicator(), ) else if (data != null) - Row( - children: [ - CircleAvatar( - backgroundImage: - CachedNetworkImageProvider(avatarImg), - ), - const SizedBox( - width: 10, - ), - SizedBox( - width: 120, - child: Text( - data.displayName ?? "Guest", - maxLines: 1, - softWrap: false, - overflow: TextOverflow.fade, - style: const TextStyle( - fontWeight: FontWeight.bold, + Flexible( + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + children: [ + CircleAvatar( + backgroundImage: + CachedNetworkImageProvider(avatarImg), + ), + const SizedBox( + width: 10, + ), + Flexible( + child: Text( + data.displayName ?? "Guest", + maxLines: 1, + softWrap: false, + overflow: TextOverflow.fade, + style: const TextStyle( + fontWeight: FontWeight.bold, + ), ), ), - ), - ], + ], + ), ), IconButton( icon: const Icon(Icons.settings_outlined),