Skip to content

Commit e58f15f

Browse files
committed
feat: improve ui
Signed-off-by: OctagonalStar <[email protected]>
1 parent 58f5fc3 commit e58f15f

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
- 重构了Config数据结构 [#27](https://github.com/OctagonalStar/arabic_learning/issues/27)
1616
- 重构了软件运行时数据结构 [#16](https://github.com/OctagonalStar/arabic_learning/issues/16)
1717
- 优化连胜逻辑: FSRS复习也计算为连胜
18+
- 调整了部分按钮的UI设计
19+
- 去除了查看详解时,单词卡片的高斯模糊
1820

1921
### Fix
2022

lib/funcs/ui.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,14 @@ void viewAnswer(BuildContext context, WordItem wordData) async {
210210
enableDrag: true,
211211
builder: (context) {
212212
return Container(
213-
padding: EdgeInsets.only(top: mediaQuery.size.height * 0.05),
214213
decoration: BoxDecoration(
215214
color: Theme.of(context).colorScheme.onPrimary,
216215
borderRadius: StaticsVar.br,
217216
),
218217
child: Column(
218+
mainAxisSize: MainAxisSize.min,
219219
children: [
220-
Expanded(child: WordCard(word: wordData)),
220+
WordCard(word: wordData, useMask: false),
221221
ElevatedButton(
222222
onPressed: () {Navigator.pop(context);},
223223
style: ElevatedButton.styleFrom(

lib/pages/learning_page.dart

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class LearningPage extends StatelessWidget {
5050
),
5151
Column(
5252
children: [
53-
ElevatedButton.icon(
53+
ElevatedButton(
5454
style: ElevatedButton.styleFrom(
5555
backgroundColor: Theme.of(context).colorScheme.secondaryContainer.withAlpha(150),
5656
foregroundColor: Theme.of(context).colorScheme.onSurface.withAlpha(150),
@@ -61,11 +61,10 @@ class LearningPage extends StatelessWidget {
6161
onPressed: () {
6262
shiftToStudy(context, 2);
6363
},
64-
icon: Icon(Icons.arrow_back, size: 24.0),
65-
label: FittedBox(fit: BoxFit.fitWidth ,child: Text("阿译中专项", style: TextStyle(fontSize: 32.0))),
64+
child: FittedBox(fit: BoxFit.fitWidth ,child: Text("阿译中专项", style: TextStyle(fontSize: 32.0))),
6665
),
6766
SizedBox(height: mediaQuery.size.height * 0.005),
68-
ElevatedButton.icon(
67+
ElevatedButton(
6968
style: ElevatedButton.styleFrom(
7069
backgroundColor: Theme.of(context).colorScheme.secondaryContainer.withAlpha(150),
7170
foregroundColor: Theme.of(context).colorScheme.onSurface.withAlpha(150),
@@ -76,8 +75,7 @@ class LearningPage extends StatelessWidget {
7675
onPressed: () {
7776
shiftToStudy(context, 1);
7877
},
79-
icon: Icon(Icons.arrow_forward, size: 24.0),
80-
label: FittedBox(fit: BoxFit.fitWidth ,child: Text("中译阿专项", style: TextStyle(fontSize: 32.0))),
78+
child: FittedBox(fit: BoxFit.fitWidth ,child: Text("中译阿专项", style: TextStyle(fontSize: 32.0))),
8179
),
8280
],
8381
),
@@ -87,7 +85,7 @@ class LearningPage extends StatelessWidget {
8785
Row(
8886
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
8987
children: [
90-
ElevatedButton.icon(
88+
ElevatedButton(
9189
style: ElevatedButton.styleFrom(
9290
backgroundColor: Theme.of(context).colorScheme.onPrimary.withAlpha(150),
9391
shadowColor: Colors.transparent,
@@ -105,8 +103,15 @@ class LearningPage extends StatelessWidget {
105103
)
106104
);
107105
},
108-
icon: Icon(Icons.history_edu, size: 24.0),
109-
label: FittedBox(fit: BoxFit.fitWidth ,child: Text("规律性学习", style: TextStyle(fontSize: 32.0))),
106+
child: FittedBox(
107+
fit: BoxFit.contain,
108+
child: Column(
109+
children: [
110+
Icon(Icons.history_edu, size: 24.0),
111+
Text("规律性学习", style: TextStyle(fontSize: 32.0)),
112+
],
113+
)
114+
),
110115
),
111116
ElevatedButton(
112117
style: ElevatedButton.styleFrom(

0 commit comments

Comments
 (0)