chore: Update font size range for danmuku plugin

This commit is contained in:
Harvey Zack committed 2024-05-27 14:18:58 +08:00
1 parent 24e51b96e2
commit 27284099d7
3 files changed
+11 -13

No files matched your search

@@ -1164,19 +1164,18 @@ class Setting {
}
});
this.slider.fontSize = this.createSlider({
min: 1,
max: 25,
min: 12,
max: 120,
steps: [],
container: this.template.$fontSizeSlider,
findIndex: ()=>{
const { clientHeight } = this.art.template.$player;
return Math.round(this.danmuku.fontSize / clientHeight * 100);
return Math.round(this.danmuku.fontSize);
},
onChange: (index)=>{
const { $fontSizeValue } = this.template;
$fontSizeValue.textContent = `${index}%`;
$fontSizeValue.textContent = `${index}px`;
this.danmuku.config({
fontSize: `${index}%`
fontSize: index
});
}
});