mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
@@ -225,22 +225,20 @@ class ComicTile extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBriefMode(BuildContext context) {
|
Widget _buildBriefMode(BuildContext context) {
|
||||||
return LayoutBuilder(
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 8),
|
||||||
|
child: LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(8),
|
||||||
onTap: _onTap,
|
onTap: _onTap,
|
||||||
onLongPress: enableLongPressed ? () => onLongPress(context) : null,
|
onLongPress:
|
||||||
|
enableLongPressed ? () => onLongPress(context) : null,
|
||||||
onSecondaryTapDown: (detail) => onSecondaryTap(detail, context),
|
onSecondaryTapDown: (detail) => onSecondaryTap(detail, context),
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(8, 8, 8, 8),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
// Wrap the Container with Expanded
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: constraints.maxWidth,
|
|
||||||
height: constraints.maxHeight,
|
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
@@ -258,29 +256,47 @@ class ComicTile extends StatelessWidget {
|
|||||||
Positioned(
|
Positioned(
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 4, vertical: 4),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
topLeft: Radius.circular(10.0),
|
topLeft: Radius.circular(10.0),
|
||||||
topRight: Radius.circular(10.0),
|
topRight: Radius.circular(10.0),
|
||||||
|
bottomRight: Radius.circular(10.0),
|
||||||
|
bottomLeft: Radius.circular(10.0),
|
||||||
),
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Colors.black.withOpacity(0.5), // 半透明黑色背景
|
color: Colors.black.withOpacity(0.5),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(8, 4, 8, 4),
|
padding:
|
||||||
|
const EdgeInsets.fromLTRB(8, 6, 8, 6),
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
maxWidth: constraints.maxWidth * 0.88,
|
||||||
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
comic.description.replaceAll("\n", ""),
|
comic.description.isEmpty
|
||||||
|
? comic.subtitle
|
||||||
|
?.replaceAll('\n', '') ??
|
||||||
|
''
|
||||||
|
: comic.description
|
||||||
|
.split('|')
|
||||||
|
.join('\n'),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
textAlign: TextAlign.right,
|
||||||
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -288,11 +304,10 @@ class ComicTile extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(8, 4, 8, 0),
|
padding: const EdgeInsets.fromLTRB(8, 4, 8, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
comic.title.replaceAll("\n", ""),
|
comic.title.replaceAll('\n', ''),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
color: Colors.white,
|
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
@@ -300,10 +315,9 @@ class ComicTile extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
void block(BuildContext comicTileContext) {
|
void block(BuildContext comicTileContext) {
|
||||||
|
Reference in New Issue
Block a user