mirror of
https://github.com/Iconica-Development/flutter_availability.git
synced 2025-05-19 05:03:44 +02:00
fix: handle really long template names by adding textoverflow.ellipsis everywhere
This commit is contained in:
parent
959500372e
commit
fcab57ecb6
4 changed files with 47 additions and 14 deletions
|
@ -217,8 +217,14 @@ class _TemplateListSectionItem extends StatelessWidget {
|
|||
width: 20,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(template.name, style: theme.textTheme.bodyLarge),
|
||||
const Spacer(),
|
||||
Expanded(
|
||||
child: Text(
|
||||
template.name,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
InkWell(
|
||||
onTap: () => onEditTemplate(template),
|
||||
child: const Icon(Icons.edit),
|
||||
|
|
|
@ -182,7 +182,13 @@ class _WeekTemplateModificationScreenState
|
|||
var overviewPage = _WeekTemplateSidePadding(
|
||||
child: Column(
|
||||
children: [
|
||||
Text(translations.templateTitleLabel, style: textTheme.titleMedium),
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
translations.templateTitleLabel,
|
||||
style: textTheme.titleMedium,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
|
@ -204,7 +210,13 @@ class _WeekTemplateModificationScreenState
|
|||
height: 20,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(_viewModel.name ?? "", style: textTheme.bodyLarge),
|
||||
Expanded(
|
||||
child: Text(
|
||||
_viewModel.name ?? "",
|
||||
style: textTheme.bodyLarge,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -103,7 +103,8 @@ class _TemplateList extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
for (var template in selectedTemplates) ...[
|
||||
|
@ -114,6 +115,8 @@ class _TemplateList extends StatelessWidget {
|
|||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
InkWell(
|
||||
onTap: onTemplatesRemoved,
|
||||
child: const Icon(Icons.remove),
|
||||
|
@ -146,7 +149,13 @@ class _TemplateListItem extends StatelessWidget {
|
|||
height: 20,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(template.name, style: theme.textTheme.bodyLarge),
|
||||
Expanded(
|
||||
child: Text(
|
||||
template.name,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
@ -230,7 +230,13 @@ class _TemplateLegendItem extends StatelessWidget {
|
|||
height: 20,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(name, style: theme.textTheme.bodyLarge),
|
||||
Expanded(
|
||||
child: Text(
|
||||
name,
|
||||
style: theme.textTheme.bodyLarge,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue