mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
Improve tags display
This commit is contained in:
@@ -550,7 +550,7 @@ class _ComicDescription extends StatelessWidget {
|
|||||||
int cnt = (constraints.maxHeight - 22).toInt() ~/ 25;
|
int cnt = (constraints.maxHeight - 22).toInt() ~/ 25;
|
||||||
return Container(
|
return Container(
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
height: 22 + cnt * 25,
|
height: 21 + cnt * 24,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
@@ -562,31 +562,30 @@ class _ComicDescription extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
for (var s in tags!)
|
for (var s in tags!)
|
||||||
Container(
|
Container(
|
||||||
height: 22,
|
height: 21,
|
||||||
padding: const EdgeInsets.fromLTRB(3, 2, 3, 2),
|
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
maxWidth: constraints.maxWidth * 0.45,
|
maxWidth: constraints.maxWidth * 0.45,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: s == "Unavailable"
|
||||||
|
? context.colorScheme.errorContainer
|
||||||
|
: context.colorScheme.secondaryContainer,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
widthFactor: 1,
|
||||||
|
child: Text(
|
||||||
|
enableTranslate
|
||||||
|
? TagsTranslation.translateTag(s)
|
||||||
|
: s.split(':').last,
|
||||||
|
style: const TextStyle(fontSize: 12),
|
||||||
|
softWrap: true,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
),
|
||||||
color: s == "Unavailable"
|
),
|
||||||
? Theme.of(context).colorScheme.errorContainer
|
|
||||||
: Theme.of(context)
|
|
||||||
.colorScheme
|
|
||||||
.secondaryContainer,
|
|
||||||
borderRadius:
|
|
||||||
const BorderRadius.all(Radius.circular(8)),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
widthFactor: 1,
|
|
||||||
child: Text(
|
|
||||||
enableTranslate
|
|
||||||
? TagsTranslation.translateTag(s)
|
|
||||||
: s.split(':').last,
|
|
||||||
style: const TextStyle(fontSize: 12),
|
|
||||||
softWrap: true,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
maxLines: 1,
|
|
||||||
))),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
).toAlign(Alignment.topCenter);
|
).toAlign(Alignment.topCenter);
|
||||||
@@ -1520,14 +1519,15 @@ class SimpleComicTile extends StatelessWidget {
|
|||||||
|
|
||||||
return AnimatedTapRegion(
|
return AnimatedTapRegion(
|
||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
onTap: onTap ?? () {
|
onTap: onTap ??
|
||||||
context.to(
|
() {
|
||||||
() => ComicPage(
|
context.to(
|
||||||
id: comic.id,
|
() => ComicPage(
|
||||||
sourceKey: comic.sourceKey,
|
id: comic.id,
|
||||||
),
|
sourceKey: comic.sourceKey,
|
||||||
);
|
),
|
||||||
},
|
);
|
||||||
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 92,
|
width: 92,
|
||||||
height: 114,
|
height: 114,
|
||||||
|
Reference in New Issue
Block a user