|
|
@@ -4949,6 +4949,7 @@ export struct LocalMusic {
|
|
|
this.setHighLyricTextSize(PreferencesUtil.getNumberSync('HighLyricTextSize', 1.23))
|
|
|
this.lyricController.setLineSpace(PreferencesUtil.getNumberSync('LyricLineSpace', 52))
|
|
|
this.changeLyricColor(PreferencesUtil.getStringSync('LyricColor', '#FFFFFF'))
|
|
|
+ this.changeLyricHightLightColor(PreferencesUtil.getStringSync('LyricHighLightColor', '#FFFFFF'))
|
|
|
this.isHightLightCenter = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_SIMI, false)
|
|
|
this.lyricController.setHightLightCenter(this.isHightLightCenter)
|
|
|
this.lyricTextWeight = PreferencesUtil.getNumberSync('lyricTextWeight',400)
|
|
|
@@ -5849,6 +5850,7 @@ export struct LocalMusic {
|
|
|
|
|
|
@State timeOffset: number = 0.0
|
|
|
@State currentLyricColor: string = '#FFFFFF'
|
|
|
+ @State currentHighLightLyricColor: string = '#FF4081'
|
|
|
// 歌词字号状态
|
|
|
@State currentLyricSize: number = 20
|
|
|
// 高亮歌词放大倍数
|
|
|
@@ -5856,6 +5858,25 @@ export struct LocalMusic {
|
|
|
@State currentLyricLineSpace: number = 52 //{
|
|
|
@State currentLyricAlignMode: number = 1
|
|
|
@State blurDegree: number = 2
|
|
|
+ @State isShowSelectColor: boolean = false
|
|
|
+ @State isShowHLSelectColor: boolean = false
|
|
|
+ // 构建颜色选择器
|
|
|
+ @Builder
|
|
|
+ SelectColor(isHighColor:boolean) {
|
|
|
+ Row({space: 10}) {
|
|
|
+ HSBColorPicker({
|
|
|
+ color: '#FFFFFF',
|
|
|
+ radius: 8,
|
|
|
+ layout: HSBColorPickerLayout.COLUMN,
|
|
|
+ predefine: ['#8b27f4', '#73f9fc', '#fffe55', '#f5cee3', '#eb4827', '#e93bf4', '#3e68f4', '#c5e6d3', '#e4e4e4', '#fa7105'],
|
|
|
+ onChange:(value: string) =>isHighColor?this.changeLyricHightLightColor(value):this.changeLyricColor(value)
|
|
|
+ })
|
|
|
+ .height(250)
|
|
|
+ .layoutWeight(1)
|
|
|
+ .padding(25)
|
|
|
+ }
|
|
|
+ .width('66%')
|
|
|
+ }
|
|
|
|
|
|
// 构建字号控制器
|
|
|
@Builder
|
|
|
@@ -5894,18 +5915,87 @@ export struct LocalMusic {
|
|
|
Text(`歌词颜色:`)
|
|
|
.fontSize(14)
|
|
|
.fontColor(Color.White)
|
|
|
+ Text(this.currentLyricColor)
|
|
|
+ .fontSize(15)
|
|
|
+ .fontColor(Color.White)
|
|
|
+ .margin({ left: 10, right: 12 })
|
|
|
+ Button({ type: ButtonType.Capsule, stateEffect: true }) {
|
|
|
+ Row() {
|
|
|
+ SymbolGlyph($r('sys.symbol.paintbrush'))
|
|
|
+ Text(`选择颜色`)
|
|
|
+ .fontSize(13)
|
|
|
+ .margin({ left: 10 })
|
|
|
+ .fontColor('007DFF')
|
|
|
|
|
|
- Row({space: 10}) {
|
|
|
- HSBColorPicker({
|
|
|
- color: '#FFFFFF',
|
|
|
- radius: 8,
|
|
|
- layout: HSBColorPickerLayout.COLUMN,
|
|
|
- onChange:(value: string) =>this.changeLyricColor(value)
|
|
|
- })
|
|
|
- .height(88)
|
|
|
- .layoutWeight(1)
|
|
|
- .padding({left:15,right:35})
|
|
|
+ }
|
|
|
}
|
|
|
+ .backgroundColor($r('app.color.bottom_control_background'))
|
|
|
+ .height(38)
|
|
|
+ .width(110)
|
|
|
+ .onClick(()=>{
|
|
|
+ this.isShowSelectColor = !this.isShowSelectColor
|
|
|
+ })
|
|
|
+ .bindPopup(this.isShowSelectColor, {
|
|
|
+ builder: this.SelectColor(false),
|
|
|
+ placement: Placement.Top,
|
|
|
+ // autoCancel: true,
|
|
|
+ mask: {color:'#33000000'},
|
|
|
+ // popupColor: Color.Yellow,
|
|
|
+ enableArrow: false,//是否显示箭头
|
|
|
+ showInSubWindow: false,
|
|
|
+ onStateChange: (e) => {
|
|
|
+ if (!e.isVisible) {
|
|
|
+ this.isShowSelectColor = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ .width('76%')
|
|
|
+ .margin({ top:10,bottom:10,right:45,left:20})
|
|
|
+
|
|
|
+ Row() {
|
|
|
+ Text(`高亮颜色:`)
|
|
|
+ .fontSize(14)
|
|
|
+ .fontColor(Color.White)
|
|
|
+ Text(this.currentHighLightLyricColor)
|
|
|
+ .fontSize(15)
|
|
|
+ .fontColor(Color.White)
|
|
|
+ .margin({ left: 10, right: 12 })
|
|
|
+ Button({ type: ButtonType.Capsule, stateEffect: true }) {
|
|
|
+ Row() {
|
|
|
+ SymbolGlyph($r('sys.symbol.paintbrush'))
|
|
|
+ Text(`选择颜色`)
|
|
|
+ .fontSize(13)
|
|
|
+ .margin({ left: 10 })
|
|
|
+ .fontColor('007DFF')
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .backgroundColor($r('app.color.bottom_control_background'))
|
|
|
+ .height(38)
|
|
|
+ .width(110)
|
|
|
+ .onClick(()=>{
|
|
|
+ this.isShowHLSelectColor = !this.isShowHLSelectColor
|
|
|
+ })
|
|
|
+ .bindPopup(this.isShowHLSelectColor, {
|
|
|
+ builder: this.SelectColor(true),
|
|
|
+ placement: Placement.Top,
|
|
|
+ // autoCancel: true,
|
|
|
+ mask: {color:'#33000000'},
|
|
|
+ // popupColor: Color.Yellow,
|
|
|
+ enableArrow: false,//是否显示箭头
|
|
|
+ showInSubWindow: false,
|
|
|
+ onStateChange: (e) => {
|
|
|
+ if (!e.isVisible) {
|
|
|
+ this.isShowHLSelectColor = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
.width('76%')
|
|
|
@@ -5948,7 +6038,6 @@ export struct LocalMusic {
|
|
|
.fontSize(14)
|
|
|
.fontColor(Color.White)
|
|
|
|
|
|
-
|
|
|
Slider({
|
|
|
value: this.currentHightLyricSize,
|
|
|
min: 1,
|
|
|
@@ -6152,10 +6241,16 @@ export struct LocalMusic {
|
|
|
this.currentLyricColor = color
|
|
|
this.lyricController
|
|
|
.setTextColor(this.currentLyricColor)
|
|
|
- .setHighlightColor(this.currentLyricColor)
|
|
|
PreferencesUtil.putSync('LyricColor', this.currentLyricColor)
|
|
|
}
|
|
|
|
|
|
+ private changeLyricHightLightColor(color: string) {
|
|
|
+ this.currentHighLightLyricColor = color
|
|
|
+ this.lyricController
|
|
|
+ .setHighlightColor(this.currentHighLightLyricColor)
|
|
|
+ PreferencesUtil.putSync('LyricHighLightColor', this.currentHighLightLyricColor)
|
|
|
+ }
|
|
|
+
|
|
|
// 构建时间控制器
|
|
|
@Builder
|
|
|
BuildTimeControls() {
|