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/2] 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/2] 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