From bffcabcf6d914cf8c768beb87e572043a64d748f Mon Sep 17 00:00:00 2001 From: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> Date: Mon, 23 Feb 2026 13:54:32 +0800 Subject: [PATCH 1/2] fix: fix wordcard text overflow Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --- lib/funcs/ui.dart | 16 ++++++++-------- pubspec.lock | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/funcs/ui.dart b/lib/funcs/ui.dart index d62dfa2..c3e3a87 100644 --- a/lib/funcs/ui.dart +++ b/lib/funcs/ui.dart @@ -512,33 +512,33 @@ class WordCard extends StatelessWidget { color: Theme.of(context).colorScheme.onInverseSurface.withAlpha(150), borderRadius: BorderRadius.vertical(bottom: Radius.circular(25.0)), ), - child: ListView( + child: Column( children: [ Row( children: [ Container( - height: useHeight*0.16, + height: useHeight*0.14, width: useWidth*0.2, decoration: BoxDecoration( color: Theme.of(context).colorScheme.onSecondary.withAlpha(150), ), - child: Center(child: Text("中文", style: TextStyle(fontSize: 18),)), + child: Center(child: Text("中文", style: TextStyle(fontSize: 16),)), ), - Expanded(child: Text(word.chinese, style: TextStyle(fontSize: 24), textAlign: TextAlign.center)) + Expanded(child: FittedBox(fit: BoxFit.scaleDown, child: Text(word.chinese, style: TextStyle(fontSize: 24)))) ], ), Divider(height: 0), Row( children: [ Container( - height: useHeight*0.3, + height: useHeight*0.32, width: useWidth*0.2, decoration: BoxDecoration( color: Theme.of(context).colorScheme.onPrimary.withAlpha(150), ), - child: Center(child: Text("解释", style: TextStyle(fontSize: 18),)), + child: Center(child: Text("解释", style: TextStyle(fontSize: 18))), ), - Expanded(child: Text(word.explanation, style: TextStyle(fontSize: 18), textAlign: TextAlign.center)) + Expanded(child: Text(word.explanation, style: TextStyle(fontSize: 16), textAlign: TextAlign.center, maxLines: 3)) ], ), Divider(height: 0), @@ -551,7 +551,7 @@ class WordCard extends StatelessWidget { color: Theme.of(context).colorScheme.onSecondary.withAlpha(150), borderRadius: BorderRadius.only(bottomLeft: Radius.circular(25.0)) ), - child: Center(child: Text("归属课程", style: TextStyle(fontSize: 16),)), + child: FittedBox(fit: BoxFit.scaleDown, child: Text("归属课程", style: TextStyle(fontSize: 16))), ), Expanded(child: Text(word.className, style: TextStyle(fontSize: 18), textAlign: TextAlign.center)) ], diff --git a/pubspec.lock b/pubspec.lock index ee99ac0..ea47f08 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1001,26 +1001,26 @@ packages: dependency: transitive description: name: test - sha256: "77cc98ea27006c84e71a7356cf3daf9ddbde2d91d84f77dbfe64cf0e4d9611ae" + sha256: "54c516bbb7cee2754d327ad4fca637f78abfc3cbcc5ace83b3eda117e42cd71a" url: "https://pub.dev" source: hosted - version: "1.28.0" + version: "1.29.0" test_api: dependency: transitive description: name: test_api - sha256: "19a78f63e83d3a61f00826d09bc2f60e191bf3504183c001262be6ac75589fb8" + sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636" url: "https://pub.dev" source: hosted - version: "0.7.8" + version: "0.7.9" test_core: dependency: transitive description: name: test_core - sha256: f1072617a6657e5fc09662e721307f7fb009b4ed89b19f47175d11d5254a62d4 + sha256: "394f07d21f0f2255ec9e3989f21e54d3c7dc0e6e9dbce160e5a9c1a6be0e2943" url: "https://pub.dev" source: hosted - version: "0.6.14" + version: "0.6.15" timezone: dependency: transitive description: From 009de980b958634a2107b33565bc4e8e1bc13241 Mon Sep 17 00:00:00 2001 From: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> Date: Mon, 23 Feb 2026 14:02:22 +0800 Subject: [PATCH 2/2] feat: correct sync loading circle size Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --- lib/sub_pages_builder/setting_pages/sync_page.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sub_pages_builder/setting_pages/sync_page.dart b/lib/sub_pages_builder/setting_pages/sync_page.dart index ce36e4d..32d1d88 100644 --- a/lib/sub_pages_builder/setting_pages/sync_page.dart +++ b/lib/sub_pages_builder/setting_pages/sync_page.dart @@ -81,12 +81,12 @@ class _DataSyncPage extends State { return Row( children: [ Icon(Icons.circle, color: Colors.redAccent, size: 18), - Text("在测试中遇到了未知的异常", style: TextStyle(fontSize: 8)) + Text("在测试中遇到了未知的异常", style: Theme.of(context).textTheme.labelSmall) ], ); } if(snapshot.connectionState == ConnectionState.waiting) { - return CircularProgressIndicator(); + return CircularProgressIndicator(constraints: BoxConstraints(minHeight: 18, minWidth: 18), strokeWidth: 2); } if(snapshot.hasData) { return Row(