Skip to content

Commit

Permalink
Merge pull request #505 from AoEiuV020/danmu-size
Browse files Browse the repository at this point in the history
increase maximum font size for non-compact devices
  • Loading branch information
Predidit authored Dec 22, 2024
2 parents 4498876 + 2e527b8 commit 3c63aa3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/pages/settings/danmaku/danmaku_settings_window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:canvas_danmaku/canvas_danmaku.dart';
import 'package:flutter/material.dart';
import 'package:hive/hive.dart';
import 'package:kazumi/utils/storage.dart';
import 'package:kazumi/utils/utils.dart';

class DanmakuSettingsWindow extends StatefulWidget {
final DanmakuController danmakuController;
Expand All @@ -27,7 +28,7 @@ class _DanmakuSettingsWindowState extends State<DanmakuSettingsWindow> {
Slider(
value: widget.danmakuController.option.fontSize,
min: 10,
max: 32,
max: Utils.isCompact() ? 32 : 48,
divisions: 22,
label: widget.danmakuController.option.fontSize.toString(),
onChanged: (value) {
Expand Down
19 changes: 19 additions & 0 deletions lib/utils/constants.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:kazumi/request/api.dart';
import 'package:kazumi/utils/utils.dart';

class StyleString {
static const double cardSpace = 8;
Expand Down Expand Up @@ -85,6 +86,24 @@ final List<double> danFontList = [
30.0,
31.0,
32.0,
if (!Utils.isCompact()) ...[
33.0,
34.0,
35.0,
36.0,
37.0,
38.0,
39.0,
40.0,
41.0,
42.0,
43.0,
44.0,
45.0,
46.0,
47.0,
48.0,
]
];

// 可选弹幕字体字重
Expand Down

0 comments on commit 3c63aa3

Please sign in to comment.