|
@@ -239,6 +239,7 @@ export struct SettingPage {
|
|
|
Row({ space: 20 }) {
|
|
Row({ space: 20 }) {
|
|
|
IBestButton({
|
|
IBestButton({
|
|
|
text: "取消",
|
|
text: "取消",
|
|
|
|
|
+ btnBorderRadius:10,
|
|
|
onBtnClick: () => {
|
|
onBtnClick: () => {
|
|
|
this.showColorPicker = false
|
|
this.showColorPicker = false
|
|
|
}
|
|
}
|
|
@@ -246,6 +247,7 @@ export struct SettingPage {
|
|
|
IBestButton({
|
|
IBestButton({
|
|
|
type: "primary",
|
|
type: "primary",
|
|
|
text: "确定",
|
|
text: "确定",
|
|
|
|
|
+ btnBorderRadius:10,
|
|
|
onBtnClick: () => {
|
|
onBtnClick: () => {
|
|
|
this.themeColor = this.customColor
|
|
this.themeColor = this.customColor
|
|
|
PreferencesUtil.putSync(SettingPage.THEME_COLOR_KEY, this.customColor)
|
|
PreferencesUtil.putSync(SettingPage.THEME_COLOR_KEY, this.customColor)
|
|
@@ -265,17 +267,17 @@ export struct SettingPage {
|
|
|
Column() {
|
|
Column() {
|
|
|
Row() {
|
|
Row() {
|
|
|
Row(){
|
|
Row(){
|
|
|
- IBestIcon({ name: 'brush-o', color: this.themeColor })
|
|
|
|
|
|
|
+ IBestIcon({ name: 'brush-o', color: this.themeColor , iconSize: 20 })
|
|
|
.margin({ right: 8 })
|
|
.margin({ right: 8 })
|
|
|
Text('颜色模式')
|
|
Text('颜色模式')
|
|
|
.fontSize(15)
|
|
.fontSize(15)
|
|
|
.fontWeight(500)
|
|
.fontWeight(500)
|
|
|
}
|
|
}
|
|
|
- .margin({ top: 12 })
|
|
|
|
|
-
|
|
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ Blank()
|
|
|
Row(){
|
|
Row(){
|
|
|
IBestRadioGroup({ group: this.colorGroup, active: $themeMode, placeDirection: Axis.Horizontal }) {
|
|
IBestRadioGroup({ group: this.colorGroup, active: $themeMode, placeDirection: Axis.Horizontal }) {
|
|
|
- ForEach(['自动', '明亮', '黑暗'], (item: string, idx: number) => {
|
|
|
|
|
|
|
+ ForEach(['自动', '日间', '夜间'], (item: string, idx: number) => {
|
|
|
Column() {
|
|
Column() {
|
|
|
IBestRadio({
|
|
IBestRadio({
|
|
|
group: this.colorGroup,
|
|
group: this.colorGroup,
|
|
@@ -283,6 +285,7 @@ export struct SettingPage {
|
|
|
label: '',
|
|
label: '',
|
|
|
name: idx
|
|
name: idx
|
|
|
})
|
|
})
|
|
|
|
|
+ .margin({ left: 3 })
|
|
|
Text(item)
|
|
Text(item)
|
|
|
.fontSize(15)
|
|
.fontSize(15)
|
|
|
.fontColor($r('app.color.text_color'))
|
|
.fontColor($r('app.color.text_color'))
|
|
@@ -297,9 +300,8 @@ export struct SettingPage {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .margin({left:24,right:12})
|
|
|
|
|
|
|
+ .margin({left:12,right:12})
|
|
|
}
|
|
}
|
|
|
- .margin({ top: 12 })
|
|
|
|
|
}
|
|
}
|
|
|
.backgroundColor($r('app.color.settings_background_main'))
|
|
.backgroundColor($r('app.color.settings_background_main'))
|
|
|
.borderRadius(18)
|
|
.borderRadius(18)
|
|
@@ -313,10 +315,9 @@ export struct SettingPage {
|
|
|
.margin({
|
|
.margin({
|
|
|
left: 0,
|
|
left: 0,
|
|
|
right: 0,
|
|
right: 0,
|
|
|
- top: 10,
|
|
|
|
|
- bottom: 18
|
|
|
|
|
|
|
+ bottom: 20
|
|
|
})
|
|
})
|
|
|
- .padding({ top: 18, bottom: 18, left: 0, right: 0 })
|
|
|
|
|
|
|
+ .padding({ top: 18, bottom: 18, left: 20, right: 20 })
|
|
|
.width('90%')
|
|
.width('90%')
|
|
|
|
|
|
|
|
// 主题色分组卡片
|
|
// 主题色分组卡片
|
|
@@ -327,14 +328,15 @@ export struct SettingPage {
|
|
|
.width(20)
|
|
.width(20)
|
|
|
.height(20)
|
|
.height(20)
|
|
|
.fillColor(this.themeColor)
|
|
.fillColor(this.themeColor)
|
|
|
- // .margin({ right: 8 })
|
|
|
|
|
Text('主题色')
|
|
Text('主题色')
|
|
|
.fontSize(15)
|
|
.fontSize(15)
|
|
|
.fontWeight(500)
|
|
.fontWeight(500)
|
|
|
|
|
+ .margin({ left: 8 })
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- .margin({left:36, top: 12 })
|
|
|
|
|
- .width("90%")
|
|
|
|
|
|
|
+ .margin({left:20, top: 12 })
|
|
|
|
|
+
|
|
|
|
|
|
|
|
Row(){
|
|
Row(){
|
|
|
Column() {
|
|
Column() {
|
|
@@ -356,9 +358,10 @@ export struct SettingPage {
|
|
|
}
|
|
}
|
|
|
.alignItems(VerticalAlign.Center)
|
|
.alignItems(VerticalAlign.Center)
|
|
|
.justifyContent(FlexAlign.Start)
|
|
.justifyContent(FlexAlign.Start)
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
}
|
|
}
|
|
|
- .width('42%')
|
|
|
|
|
.height(40)
|
|
.height(40)
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
.backgroundColor(
|
|
.backgroundColor(
|
|
|
(item.name === '自定义' && this.isCustomThemeColor()) || this.themeColor === item.color
|
|
(item.name === '自定义' && this.isCustomThemeColor()) || this.themeColor === item.color
|
|
|
? this.themeColor
|
|
? this.themeColor
|
|
@@ -375,11 +378,11 @@ export struct SettingPage {
|
|
|
this.sendChangeEvent()
|
|
this.sendChangeEvent()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- .margin({ right: colIdx === 0 ? '4%' : 0, bottom: 10, left: 0 })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ .margin({ right: colIdx === 0 ? '4%' : 20, bottom: 10, left: 20 })
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
.justifyContent(FlexAlign.Start)
|
|
.justifyContent(FlexAlign.Start)
|
|
|
- .margin({ left: 12, right: 12 })
|
|
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
.margin({ left: 12, right: 12, top: 12 })
|
|
.margin({ left: 12, right: 12, top: 12 })
|
|
@@ -399,7 +402,6 @@ export struct SettingPage {
|
|
|
.margin({
|
|
.margin({
|
|
|
left: 0,
|
|
left: 0,
|
|
|
right: 0,
|
|
right: 0,
|
|
|
- top: 10,
|
|
|
|
|
bottom: 18
|
|
bottom: 18
|
|
|
})
|
|
})
|
|
|
.padding({ top: 18, bottom: 18, left: 0, right: 0 })
|
|
.padding({ top: 18, bottom: 18, left: 0, right: 0 })
|
|
@@ -408,7 +410,8 @@ export struct SettingPage {
|
|
|
IBestPopup({
|
|
IBestPopup({
|
|
|
visible: $showColorPicker,
|
|
visible: $showColorPicker,
|
|
|
popupWidth: 320,
|
|
popupWidth: 320,
|
|
|
- contentBuilder: (): void => this.pickerBuilder()
|
|
|
|
|
|
|
+ contentBuilder: (): void => this.pickerBuilder(),
|
|
|
|
|
+ cornerRadius:20,
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
.padding({ top: 8, bottom: 8, left: 18, right: 18 })
|
|
.padding({ top: 8, bottom: 8, left: 18, right: 18 })
|
|
@@ -491,7 +494,7 @@ export struct SettingPage {
|
|
|
// }
|
|
// }
|
|
|
})
|
|
})
|
|
|
.bindSheet($$this.isThemeSheet, this.themeSheetBuilder(), {
|
|
.bindSheet($$this.isThemeSheet, this.themeSheetBuilder(), {
|
|
|
- height: '90%',
|
|
|
|
|
|
|
+ height: '95%',
|
|
|
dragBar: true,
|
|
dragBar: true,
|
|
|
preferType: this.currentBreakpoint !== BreakpointTypeEnum.SM ? SheetType.CENTER : SheetType.BOTTOM,
|
|
preferType: this.currentBreakpoint !== BreakpointTypeEnum.SM ? SheetType.CENTER : SheetType.BOTTOM,
|
|
|
showClose: true,
|
|
showClose: true,
|
|
@@ -513,7 +516,7 @@ export struct SettingPage {
|
|
|
.fontWeight(480)
|
|
.fontWeight(480)
|
|
|
.layoutWeight(1)
|
|
.layoutWeight(1)
|
|
|
.bindSheet($$this.isCustomizeBgSheet, this.customizeBgSheet(), {
|
|
.bindSheet($$this.isCustomizeBgSheet, this.customizeBgSheet(), {
|
|
|
- height: '90%',
|
|
|
|
|
|
|
+ height: '95%',
|
|
|
dragBar: true,
|
|
dragBar: true,
|
|
|
preferType: this.currentBreakpoint !== BreakpointTypeEnum.SM ? SheetType.CENTER : SheetType.BOTTOM,
|
|
preferType: this.currentBreakpoint !== BreakpointTypeEnum.SM ? SheetType.CENTER : SheetType.BOTTOM,
|
|
|
showClose: true,
|
|
showClose: true,
|
|
@@ -905,7 +908,7 @@ export struct SettingPage {
|
|
|
//发送广播通知更新UI
|
|
//发送广播通知更新UI
|
|
|
sendChangeEvent() {
|
|
sendChangeEvent() {
|
|
|
const eventData: emitter.EventData = {};
|
|
const eventData: emitter.EventData = {};
|
|
|
- emitter.emit({ eventId: 333 }, eventData); // 发送音频广播通知更新doSwipBack
|
|
|
|
|
|
|
+ emitter.emit({ eventId: 333 }, eventData); // 发送广播通知更新doSwipBack
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
goSelectImage() {
|
|
goSelectImage() {
|