mirror of
https://github.com/Iconica-Development/flutter_availability.git
synced 2025-05-19 13:13: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,
|
width: 20,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(template.name, style: theme.textTheme.bodyLarge),
|
Expanded(
|
||||||
const Spacer(),
|
child: Text(
|
||||||
|
template.name,
|
||||||
|
style: theme.textTheme.bodyLarge,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 4),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () => onEditTemplate(template),
|
onTap: () => onEditTemplate(template),
|
||||||
child: const Icon(Icons.edit),
|
child: const Icon(Icons.edit),
|
||||||
|
|
|
@ -182,7 +182,13 @@ class _WeekTemplateModificationScreenState
|
||||||
var overviewPage = _WeekTemplateSidePadding(
|
var overviewPage = _WeekTemplateSidePadding(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(translations.templateTitleLabel, style: textTheme.titleMedium),
|
Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
translations.templateTitleLabel,
|
||||||
|
style: textTheme.titleMedium,
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(12),
|
padding: const EdgeInsets.all(12),
|
||||||
|
@ -204,7 +210,13 @@ class _WeekTemplateModificationScreenState
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
Text(_viewModel.name ?? "", style: textTheme.bodyLarge),
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
_viewModel.name ?? "",
|
||||||
|
style: textTheme.bodyLarge,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -103,17 +103,20 @@ class _TemplateList extends StatelessWidget {
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Expanded(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
for (var template in selectedTemplates) ...[
|
children: [
|
||||||
_TemplateListItem(template: template),
|
for (var template in selectedTemplates) ...[
|
||||||
if (template != selectedTemplates.last) ...[
|
_TemplateListItem(template: template),
|
||||||
const SizedBox(height: 12),
|
if (template != selectedTemplates.last) ...[
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: onTemplatesRemoved,
|
onTap: onTemplatesRemoved,
|
||||||
child: const Icon(Icons.remove),
|
child: const Icon(Icons.remove),
|
||||||
|
@ -146,7 +149,13 @@ class _TemplateListItem extends StatelessWidget {
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 12),
|
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,
|
height: 20,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
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