From d20f6c028985f2fe351a0247a7a8f25b36059da4 Mon Sep 17 00:00:00 2001 From: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> Date: Sat, 14 Feb 2026 15:54:50 +0800 Subject: [PATCH 1/3] feat: fix fsrs review page overflow Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --- lib/pages/learning_page.dart | 12 ++++++------ lib/sub_pages_builder/learning_pages/fsrs_pages.dart | 11 ++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/pages/learning_page.dart b/lib/pages/learning_page.dart index cd6276c..9399138 100644 --- a/lib/pages/learning_page.dart +++ b/lib/pages/learning_page.dart @@ -29,7 +29,7 @@ class LearningPage extends StatelessWidget { ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).colorScheme.onPrimary.withAlpha(150), - fixedSize: Size(mediaQuery.size.width * 0.4, mediaQuery.size.height * 0.2), + fixedSize: Size(mediaQuery.size.width * 0.4, mediaQuery.size.height * 0.15), shape: RoundedRectangleBorder(borderRadius: BorderRadiusGeometry.vertical(top: Radius.circular(25.0))), ), onPressed: () { @@ -63,7 +63,7 @@ class LearningPage extends StatelessWidget { ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).colorScheme.onPrimary.withAlpha(150), - fixedSize: Size(mediaQuery.size.width * 0.4, mediaQuery.size.height * 0.3), + fixedSize: Size(mediaQuery.size.width * 0.4, mediaQuery.size.height * 0.25), shape: RoundedRectangleBorder( borderRadius: StaticsVar.br, ), @@ -99,7 +99,7 @@ class LearningPage extends StatelessWidget { if(context.read().globalFSRS.config.pushAmount != 0) ElevatedButton.icon( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).colorScheme.onPrimary.withAlpha(150), - fixedSize: Size(mediaQuery.size.width * 0.7, mediaQuery.size.height * 0.2), + fixedSize: Size(mediaQuery.size.width * 0.8, mediaQuery.size.height * 0.15), shape: RoundedRectangleBorder(borderRadius: StaticsVar.br), ), onPressed: (){ @@ -128,13 +128,13 @@ class LearningPage extends StatelessWidget { ); }, icon: Icon(Icons.push_pin, size: 24), - label: Text("学习推送单词", style: TextStyle(fontSize: 40.0, fontWeight: FontWeight.bold)), + label: FittedBox(child: Text("学习推送单词", style: TextStyle(fontSize: 40.0))), ), SizedBox(height: mediaQuery.size.height * 0.05), ElevatedButton.icon( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).colorScheme.onPrimary.withAlpha(150), - fixedSize: Size(mediaQuery.size.width * 0.7, mediaQuery.size.height * 0.2), + fixedSize: Size(mediaQuery.size.width * 0.8, mediaQuery.size.height * 0.2), shape: RoundedRectangleBorder(borderRadius: StaticsVar.br), ), onPressed: (){ @@ -147,7 +147,7 @@ class LearningPage extends StatelessWidget { ); }, icon: Icon(Icons.abc, size: 24), - label: Text("词汇总览", style: TextStyle(fontSize: 40.0, fontWeight: FontWeight.bold)), + label: Text("词汇总览", style: TextStyle(fontSize: 40.0)), ), ] ); diff --git a/lib/sub_pages_builder/learning_pages/fsrs_pages.dart b/lib/sub_pages_builder/learning_pages/fsrs_pages.dart index 52d0035..4d7dfb4 100644 --- a/lib/sub_pages_builder/learning_pages/fsrs_pages.dart +++ b/lib/sub_pages_builder/learning_pages/fsrs_pages.dart @@ -345,7 +345,7 @@ class _FSRSReviewCardPage extends State { return Material( child: ChoiceQuestions( mainWord: widget.fsrs.config.selfEvaluate ? "[selfEvaluate]" : wordData[widget.wordID].arabic, - midWidget: widget.fsrs.config.selfEvaluate ? WordCard(word: wordData[widget.wordID]) : null, + midWidget: widget.fsrs.config.selfEvaluate ? WordCard(word: wordData[widget.wordID], width: mediaQuery.size.width * 0.8, height: mediaQuery.size.height * 0.4, useMask: !choosed) : null, choices: options!, allowAudio: true, allowAnitmation: !widget.fsrs.config.selfEvaluate, @@ -395,10 +395,10 @@ class _FSRSReviewCardPage extends State { icon: Icon(Icons.tips_and_updates), label: Text(value == 0.0 ? "忘了?" : "详解"), ), - if(!widget.fsrs.config.selfEvaluate) SizedBox(width: mediaQuery.size.width*0.02*value), + SizedBox(width: mediaQuery.size.width*0.02*value, height: mediaQuery.size.height * 0.1), if(value > 0.3) ElevatedButton.icon( style: ElevatedButton.styleFrom( - fixedSize: Size(mediaQuery.size.width * (widget.fsrs.config.selfEvaluate ? 1 : 0.5) * value, mediaQuery.size.height * 0.1), + fixedSize: Size(mediaQuery.size.width * (widget.fsrs.config.selfEvaluate ? 0.8 : 0.5) * value, mediaQuery.size.height * 0.1), shape: RoundedRectangleBorder(borderRadius: StaticsVar.br) ), onPressed: () { @@ -473,7 +473,7 @@ class _FSRSLearningPageState extends State { Expanded(child: SizedBox()), ElevatedButton.icon( style: ElevatedButton.styleFrom( - fixedSize: Size(mediaQuery.size.width * 0.8, mediaQuery.size.height * 0.2), + fixedSize: Size(mediaQuery.size.width * 0.8, mediaQuery.size.height * 0.15), shape: RoundedRectangleBorder(borderRadius: StaticsVar.br) ), icon: Icon(index == widget.words.length-1 ? Icons.arrow_forward : Icons.arrow_downward), @@ -485,7 +485,8 @@ class _FSRSLearningPageState extends State { controllerLearning.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); } }, - ) + ), + SizedBox(height: mediaQuery.size.height * 0.02) ], ); } From 464bc741fbf884c801828fbceb6fe577fbf5d108 Mon Sep 17 00:00:00 2001 From: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> Date: Sat, 14 Feb 2026 17:02:53 +0800 Subject: [PATCH 2/3] feat: update changelog Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e36d2ba..da23673 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v?.?.? - ????-??-?? - (??????) + +### Fix + +- 修复了自我评级开启时复习页面可能溢出的问题 + ## v0.1.13 - 2026-2-6 - (000113) ### Added From c4593e6388cf659d8286063512a869ca0f44c977 Mon Sep 17 00:00:00 2001 From: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> Date: Sat, 14 Feb 2026 21:09:27 +0800 Subject: [PATCH 3/3] feat: improve word card layout Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ lib/funcs/ui.dart | 52 +++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da23673..1af256d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## v?.?.? - ????-??-?? - (??????) +### Improvement + +- 优化了单词卡片的排版 + ### Fix - 修复了自我评级开启时复习页面可能溢出的问题 diff --git a/lib/funcs/ui.dart b/lib/funcs/ui.dart index 231278c..d62dfa2 100644 --- a/lib/funcs/ui.dart +++ b/lib/funcs/ui.dart @@ -512,12 +512,52 @@ class WordCard extends StatelessWidget { color: Theme.of(context).colorScheme.onInverseSurface.withAlpha(150), borderRadius: BorderRadius.vertical(bottom: Radius.circular(25.0)), ), - child: Center( - child: Text(' 中文:${word.chinese}\n 示例:${word.explanation}\n 归属课程:${word.className}', - style: Theme.of(context).textTheme.bodyLarge, - textAlign: TextAlign.left, - ), - ), + child: ListView( + children: [ + Row( + children: [ + Container( + height: useHeight*0.16, + width: useWidth*0.2, + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.onSecondary.withAlpha(150), + ), + child: Center(child: Text("中文", style: TextStyle(fontSize: 18),)), + ), + Expanded(child: Text(word.chinese, style: TextStyle(fontSize: 24), textAlign: TextAlign.center)) + ], + ), + Divider(height: 0), + Row( + children: [ + Container( + height: useHeight*0.3, + width: useWidth*0.2, + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.onPrimary.withAlpha(150), + ), + child: Center(child: Text("解释", style: TextStyle(fontSize: 18),)), + ), + Expanded(child: Text(word.explanation, style: TextStyle(fontSize: 18), textAlign: TextAlign.center)) + ], + ), + Divider(height: 0), + Row( + children: [ + Container( + height: useHeight*0.14, + width: useWidth*0.2, + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.onSecondary.withAlpha(150), + borderRadius: BorderRadius.only(bottomLeft: Radius.circular(25.0)) + ), + child: Center(child: Text("归属课程", style: TextStyle(fontSize: 16),)), + ), + Expanded(child: Text(word.className, style: TextStyle(fontSize: 18), textAlign: TextAlign.center)) + ], + ) + ], + ) ), StatefulBuilder( builder: (context, setLocalState) {