Merge branch 'design' into alpha

This commit is contained in:
guozhigq
2023-09-04 11:11:27 +08:00
6 changed files with 414 additions and 37 deletions

View File

@ -3,6 +3,7 @@ import 'package:ns_danmaku/ns_danmaku.dart';
class DmUtils {
static Color decimalToColor(int decimalColor) {
// 16777215 表示白色
int red = (decimalColor >> 16) & 0xFF;
int green = (decimalColor >> 8) & 0xFF;
int blue = decimalColor & 0xFF;

View File

@ -34,7 +34,12 @@ class GStrorage {
},
);
// 本地缓存
localCache = await Hive.openBox('localCache');
localCache = await Hive.openBox(
'localCache',
compactionStrategy: (entries, deletedEntries) {
return deletedEntries > 4;
},
);
// 设置
setting = await Hive.openBox('setting');
// 搜索历史
@ -134,6 +139,13 @@ class LocalCacheKey {
//
static const String wbiKeys = 'wbiKeys';
static const String timeStamp = 'timeStamp';
// 弹幕相关设置 屏蔽类型 显示区域 透明度 字体大小 弹幕速度
static const String danmakuBlockType = 'danmakuBlockType';
static const String danmakuShowArea = 'danmakuShowArea';
static const String danmakuOpacity = 'danmakuOpacity';
static const String danmakuFontScale = 'danmakuFontScale';
static const String danmakuSpeed = 'danmakuSpeed';
}
class VideoBoxKey {