feat: elide sidebar text (#1026)

This commit is contained in:
Richard Shiue 2022-10-03 09:58:13 +08:00 committed by GitHub
parent cff24581a4
commit 2331b328d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -99,6 +99,7 @@ class MenuAppHeader extends StatelessWidget {
app.name,
fontSize: 12,
color: theme.textColor,
overflow: TextOverflow.ellipsis,
),
),
),

View File

@ -82,7 +82,7 @@ class ViewSectionItem extends StatelessWidget {
child: FlowyText.regular(
state.view.name,
fontSize: 12,
overflow: TextOverflow.clip,
overflow: TextOverflow.ellipsis,
),
),
];

View File

@ -28,8 +28,9 @@ class MenuUser extends StatelessWidget {
children: [
_renderAvatar(context),
const HSpace(10),
_renderUserName(context),
const Spacer(),
Expanded(
child: _renderUserName(context),
),
_renderSettingsButton(context),
//ToDo: when the user is allowed to create another workspace,
//we get the below block back
@ -63,7 +64,7 @@ class MenuUser extends StatelessWidget {
if (name.isEmpty) {
name = context.read<MenuUserBloc>().state.userProfile.email;
}
return FlowyText(name, fontSize: 12);
return FlowyText(name, fontSize: 12, overflow: TextOverflow.ellipsis);
}
Widget _renderSettingsButton(BuildContext context) {