mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
fix tag overflow
This commit is contained in:
@@ -405,46 +405,57 @@ class _ComicDescription extends StatelessWidget {
|
|||||||
height: 4,
|
height: 4,
|
||||||
),
|
),
|
||||||
if (tags != null)
|
if (tags != null)
|
||||||
LayoutBuilder(builder: (context, constraints) {
|
Expanded(
|
||||||
return Container(
|
child: LayoutBuilder(builder: (context, constraints) {
|
||||||
constraints: const BoxConstraints(maxHeight: 47),
|
if (constraints.maxHeight < 22) {
|
||||||
child: Wrap(
|
return Container();
|
||||||
runAlignment: WrapAlignment.start,
|
}
|
||||||
|
int cnt = (constraints.maxHeight - 22).toInt() ~/ 25;
|
||||||
|
return Container(
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
crossAxisAlignment: WrapCrossAlignment.end,
|
height: 22 + cnt * 25,
|
||||||
spacing: 4,
|
width: double.infinity,
|
||||||
runSpacing: 3,
|
decoration: const BoxDecoration(),
|
||||||
children: [
|
child: Wrap(
|
||||||
for (var s in tags!)
|
runAlignment: WrapAlignment.start,
|
||||||
Container(
|
clipBehavior: Clip.antiAlias,
|
||||||
height: 22,
|
crossAxisAlignment: WrapCrossAlignment.end,
|
||||||
padding: const EdgeInsets.fromLTRB(3,2,3,2),
|
spacing: 4,
|
||||||
constraints: BoxConstraints(
|
runSpacing: 3,
|
||||||
maxWidth: constraints.maxWidth * 0.45,
|
children: [
|
||||||
),
|
for (var s in tags!)
|
||||||
decoration: BoxDecoration(
|
Container(
|
||||||
color: s == "Unavailable"
|
height: 22,
|
||||||
? Theme.of(context).colorScheme.errorContainer
|
padding: const EdgeInsets.fromLTRB(3, 2, 3, 2),
|
||||||
: Theme.of(context)
|
constraints: BoxConstraints(
|
||||||
.colorScheme
|
maxWidth: constraints.maxWidth * 0.45,
|
||||||
.secondaryContainer,
|
),
|
||||||
borderRadius:
|
decoration: BoxDecoration(
|
||||||
const BorderRadius.all(Radius.circular(8)),
|
color: s == "Unavailable"
|
||||||
),
|
? Theme.of(context).colorScheme.errorContainer
|
||||||
child: Text(
|
: Theme.of(context)
|
||||||
enableTranslate
|
.colorScheme
|
||||||
? TagsTranslation.translateTag(s)
|
.secondaryContainer,
|
||||||
: s,
|
borderRadius:
|
||||||
style: const TextStyle(fontSize: 12),
|
const BorderRadius.all(Radius.circular(8)),
|
||||||
softWrap: true,
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
child: Center(
|
||||||
maxLines: 1,
|
widthFactor: 1,
|
||||||
)),
|
child: Text(
|
||||||
],
|
enableTranslate
|
||||||
),
|
? TagsTranslation.translateTag(s)
|
||||||
);
|
: s,
|
||||||
}),
|
style: const TextStyle(fontSize: 12),
|
||||||
const Spacer(),
|
softWrap: true,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
))),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
).toAlign(Alignment.topCenter);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
// const Spacer(),
|
||||||
if (rating != null) StarRating(value: rating!, size: 18),
|
if (rating != null) StarRating(value: rating!, size: 18),
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
Reference in New Issue
Block a user