提交 ec83fecd 编写于 作者: AndroidLeaves's avatar AndroidLeaves

update

上级 68454fbf
......@@ -8,7 +8,7 @@
*/
// 当前环境版本号
const VERSION = 20230204
const VERSION = 20230205
// 组件配置文件名
const settingConfigName = 'settings.json';
// 分支
......@@ -3325,37 +3325,45 @@ class BaseWidget {
}
} else if (picType == 2) {
if (dayBackgroundImagePath && !Device.isUsingDarkAppearance()) {
dayBackgroundImagePathTmp = this.dayLocalBgName();
let dayBgImg = this.useFileManager().readImgCache(dayBackgroundImagePath);
if (localBlurBg) {
dayBgImg = await this.blurImage(dayBgImg, { w: dayBgImg.size.width, h: dayBgImg.size.height, x: 0, y: 0 }, localBlurMode, localBlurRadius);
dayBackgroundImagePathTmp = dayBackgroundImagePathTmp + "_blur";
}
if (localShadow) {
let alpha = Number(localShadowAlpha);
alpha = Math.min(1, alpha);
alpha = Math.max(0, alpha);
dayBgImg = await this.loadShadowColor2Image(dayBgImg, new Color(localShadowColor, alpha));
dayBackgroundImagePathTmp = dayBackgroundImagePathTmp + "_shadow";
}
if (dayBgImg) {
this.useFileManager().writeImgCache(dayBackgroundImagePathTmp, dayBgImg);
}
dayBackgroundImagePathTmp = this.dayLocalBgName() + "_blur";
this.useFileManager().writeImgCache(dayBackgroundImagePathTmp, dayBgImg);
}
if (nightBackgroundImagePath && Device.isUsingDarkAppearance()) {
nightBackgroundImagePathTmp = this.nightLocalBgName();
let nightBgImg = this.useFileManager().readImgCache(nightBackgroundImagePath);
if (localBlurBg) {
nightBgImg = await this.blurImage(nightBgImg, { w: nightBgImg.size.width, h: nightBgImg.size.height, x: 0, y: 0 }, localBlurMode, localBlurRadius);
nightBackgroundImagePathTmp = nightBackgroundImagePathTmp + "_blur";
}
if (localShadow) {
let alpha = Number(localShadowAlpha);
alpha = Math.min(1, alpha);
alpha = Math.max(0, alpha);
nightBgImg = await this.loadShadowColor2Image(nightBgImg, new Color(localShadowColor, alpha));
nightBackgroundImagePathTmp = nightBackgroundImagePathTmp + "_shadow";
}
if (nightBgImg) {
this.useFileManager().writeImgCache(nightBackgroundImagePathTmp, nightBgImg);
}
nightBackgroundImagePathTmp = this.nightLocalBgName() + "_blur";
this.useFileManager().writeImgCache(nightBackgroundImagePathTmp, nightBgImg);
}
}
const dayBackgroundImage = this.useFileManager().readImgCache(dayBackgroundImagePathTmp || dayBackgroundImagePath);
const nightBackgroundImage = this.useFileManager().readImgCache(nightBackgroundImagePathTmp || nightBackgroundImagePath);
bgImg = Device.isUsingDarkAppearance() ? nightBackgroundImage || dayBackgroundImage : dayBackgroundImage || nightBackgroundImage;
bgImg = Device.isUsingDarkAppearance() ? (nightBackgroundImage || dayBackgroundImage) : (dayBackgroundImage || nightBackgroundImage);
if (bgImg) {
widget.backgroundImage = bgImg;
}
......
......@@ -8,7 +8,7 @@
// -------------------------------------------------------
// 是否是开发环境,配合手机端调试使用,正式发布设置为false
const isDev = false;
const dependencyLSP = '20230204';
const dependencyLSP = '20230205';
console.log(`当前环境 👉👉👉👉👉 ${isDev ? 'DEV' : 'RELEASE'}`);
console.log(`----------------------------------------`);
// 分支
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册