Skip to content

Commit 6366e2d

Browse files
fix fsrs review overflow (#63)
* feat: fix fsrs review page overflow Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> * feat: update changelog Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --------- Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com>
1 parent 1e1bafb commit 6366e2d

3 files changed

Lines changed: 18 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v?.?.? - ????-??-?? - (??????)
4+
5+
### Fix
6+
7+
- 修复了自我评级开启时复习页面可能溢出的问题
8+
39
## v0.1.13 - 2026-2-6 - (000113)
410

511
### Added

lib/pages/learning_page.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class LearningPage extends StatelessWidget {
2929
ElevatedButton(
3030
style: ElevatedButton.styleFrom(
3131
backgroundColor: Theme.of(context).colorScheme.onPrimary.withAlpha(150),
32-
fixedSize: Size(mediaQuery.size.width * 0.4, mediaQuery.size.height * 0.2),
32+
fixedSize: Size(mediaQuery.size.width * 0.4, mediaQuery.size.height * 0.15),
3333
shape: RoundedRectangleBorder(borderRadius: BorderRadiusGeometry.vertical(top: Radius.circular(25.0))),
3434
),
3535
onPressed: () {
@@ -63,7 +63,7 @@ class LearningPage extends StatelessWidget {
6363
ElevatedButton(
6464
style: ElevatedButton.styleFrom(
6565
backgroundColor: Theme.of(context).colorScheme.onPrimary.withAlpha(150),
66-
fixedSize: Size(mediaQuery.size.width * 0.4, mediaQuery.size.height * 0.3),
66+
fixedSize: Size(mediaQuery.size.width * 0.4, mediaQuery.size.height * 0.25),
6767
shape: RoundedRectangleBorder(
6868
borderRadius: StaticsVar.br,
6969
),
@@ -99,7 +99,7 @@ class LearningPage extends StatelessWidget {
9999
if(context.read<Global>().globalFSRS.config.pushAmount != 0) ElevatedButton.icon(
100100
style: ElevatedButton.styleFrom(
101101
backgroundColor: Theme.of(context).colorScheme.onPrimary.withAlpha(150),
102-
fixedSize: Size(mediaQuery.size.width * 0.7, mediaQuery.size.height * 0.2),
102+
fixedSize: Size(mediaQuery.size.width * 0.8, mediaQuery.size.height * 0.15),
103103
shape: RoundedRectangleBorder(borderRadius: StaticsVar.br),
104104
),
105105
onPressed: (){
@@ -128,13 +128,13 @@ class LearningPage extends StatelessWidget {
128128
);
129129
},
130130
icon: Icon(Icons.push_pin, size: 24),
131-
label: Text("学习推送单词", style: TextStyle(fontSize: 40.0, fontWeight: FontWeight.bold)),
131+
label: FittedBox(child: Text("学习推送单词", style: TextStyle(fontSize: 40.0))),
132132
),
133133
SizedBox(height: mediaQuery.size.height * 0.05),
134134
ElevatedButton.icon(
135135
style: ElevatedButton.styleFrom(
136136
backgroundColor: Theme.of(context).colorScheme.onPrimary.withAlpha(150),
137-
fixedSize: Size(mediaQuery.size.width * 0.7, mediaQuery.size.height * 0.2),
137+
fixedSize: Size(mediaQuery.size.width * 0.8, mediaQuery.size.height * 0.2),
138138
shape: RoundedRectangleBorder(borderRadius: StaticsVar.br),
139139
),
140140
onPressed: (){
@@ -147,7 +147,7 @@ class LearningPage extends StatelessWidget {
147147
);
148148
},
149149
icon: Icon(Icons.abc, size: 24),
150-
label: Text("词汇总览", style: TextStyle(fontSize: 40.0, fontWeight: FontWeight.bold)),
150+
label: Text("词汇总览", style: TextStyle(fontSize: 40.0)),
151151
),
152152
]
153153
);

lib/sub_pages_builder/learning_pages/fsrs_pages.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ class _FSRSReviewCardPage extends State<FSRSReviewCardPage> {
345345
return Material(
346346
child: ChoiceQuestions(
347347
mainWord: widget.fsrs.config.selfEvaluate ? "[selfEvaluate]" : wordData[widget.wordID].arabic,
348-
midWidget: widget.fsrs.config.selfEvaluate ? WordCard(word: wordData[widget.wordID]) : null,
348+
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,
349349
choices: options!,
350350
allowAudio: true,
351351
allowAnitmation: !widget.fsrs.config.selfEvaluate,
@@ -395,10 +395,10 @@ class _FSRSReviewCardPage extends State<FSRSReviewCardPage> {
395395
icon: Icon(Icons.tips_and_updates),
396396
label: Text(value == 0.0 ? "忘了?" : "详解"),
397397
),
398-
if(!widget.fsrs.config.selfEvaluate) SizedBox(width: mediaQuery.size.width*0.02*value),
398+
SizedBox(width: mediaQuery.size.width*0.02*value, height: mediaQuery.size.height * 0.1),
399399
if(value > 0.3) ElevatedButton.icon(
400400
style: ElevatedButton.styleFrom(
401-
fixedSize: Size(mediaQuery.size.width * (widget.fsrs.config.selfEvaluate ? 1 : 0.5) * value, mediaQuery.size.height * 0.1),
401+
fixedSize: Size(mediaQuery.size.width * (widget.fsrs.config.selfEvaluate ? 0.8 : 0.5) * value, mediaQuery.size.height * 0.1),
402402
shape: RoundedRectangleBorder(borderRadius: StaticsVar.br)
403403
),
404404
onPressed: () {
@@ -473,7 +473,7 @@ class _FSRSLearningPageState extends State<FSRSLearningPage> {
473473
Expanded(child: SizedBox()),
474474
ElevatedButton.icon(
475475
style: ElevatedButton.styleFrom(
476-
fixedSize: Size(mediaQuery.size.width * 0.8, mediaQuery.size.height * 0.2),
476+
fixedSize: Size(mediaQuery.size.width * 0.8, mediaQuery.size.height * 0.15),
477477
shape: RoundedRectangleBorder(borderRadius: StaticsVar.br)
478478
),
479479
icon: Icon(index == widget.words.length-1 ? Icons.arrow_forward : Icons.arrow_downward),
@@ -485,7 +485,8 @@ class _FSRSLearningPageState extends State<FSRSLearningPage> {
485485
controllerLearning.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve);
486486
}
487487
},
488-
)
488+
),
489+
SizedBox(height: mediaQuery.size.height * 0.02)
489490
],
490491
);
491492
}

0 commit comments

Comments
 (0)