Skip to content

Commit

Permalink
Added back & simplified bangumi cards' padding
Browse files Browse the repository at this point in the history
  • Loading branch information
garylkz committed Feb 2, 2025
1 parent 37182e4 commit d846618
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
30 changes: 13 additions & 17 deletions lib/bean/card/bangumi_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,28 +93,24 @@ class BangumiContent extends StatelessWidget {

@override
Widget build(BuildContext context) {
final ts = MediaQuery.textScalerOf(context);

return Expanded(
child: Padding(
// 多列
padding: const EdgeInsets.fromLTRB(5, 3, 5, 0),
padding: const EdgeInsets.fromLTRB(5, 3, 5, 1),
// 单列
// padding: const EdgeInsets.fromLTRB(14, 10, 4, 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
bangumiItem.nameCn,
textAlign: TextAlign.start,
style: const TextStyle(
fontWeight: FontWeight.w500,
letterSpacing: 0.3,
),
textScaler:
MediaQuery.textScalerOf(context).clamp(maxScaleFactor: 1.1),
maxLines: Utils.isDesktop() || Utils.isTablet() ? 3 : 2,
overflow: TextOverflow.ellipsis,
),
],
child: Text(
bangumiItem.nameCn,
textAlign: TextAlign.start,
style: const TextStyle(
fontWeight: FontWeight.w500,
letterSpacing: 0.3,
),
textScaler: ts.clamp(maxScaleFactor: 1.1),
maxLines: Utils.isDesktop() || Utils.isTablet() ? 3 : 2,
overflow: TextOverflow.ellipsis,
),
),
);
Expand Down
1 change: 1 addition & 0 deletions lib/bean/card/bangumi_history_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class _BangumiHistoryCardVState extends State<BangumiHistoryCardV> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 4),
RichText(
maxLines: 1,
overflow: TextOverflow.ellipsis,
Expand Down

0 comments on commit d846618

Please sign in to comment.