mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-23 23:57:22 +08:00
🔧 chore: 更新依赖版本,优化 Electron 窗口设置,调整歌词窗口背景色样式
This commit is contained in:
+4
-1
@@ -84,15 +84,18 @@ const createWin = () => {
|
||||
frame: false,
|
||||
show: false,
|
||||
transparent: true,
|
||||
opacity: 1,
|
||||
hasShadow: false,
|
||||
alwaysOnTop: true,
|
||||
resizable: true,
|
||||
roundedCorners: false,
|
||||
// 添加跨屏幕支持选项
|
||||
webPreferences: {
|
||||
preload: join(__dirname, '../preload/index.js'),
|
||||
sandbox: false,
|
||||
contextIsolation: true
|
||||
}
|
||||
},
|
||||
backgroundColor: '#00000000'
|
||||
});
|
||||
|
||||
// 监听窗口关闭事件
|
||||
|
||||
@@ -172,6 +172,16 @@ const handleMouseLeave = () => {
|
||||
if (!lyricSetting.value.isLock) return;
|
||||
isHovering.value = false;
|
||||
windowData.electron.ipcRenderer.send('set-ignore-mouse', false);
|
||||
|
||||
// 强制重置背景色
|
||||
const lyricWindow = document.querySelector('.lyric-window') as HTMLElement;
|
||||
if (lyricWindow) {
|
||||
lyricWindow.style.background = 'transparent';
|
||||
// 使用 requestAnimationFrame 确保在下一帧重置
|
||||
requestAnimationFrame(() => {
|
||||
lyricWindow.style.background = 'transparent';
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 监听锁定状态变化
|
||||
@@ -633,8 +643,12 @@ const handleNext = () => {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
body {
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
background-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -644,14 +658,13 @@ body {
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
background: transparent !important;
|
||||
user-select: none;
|
||||
transition: background-color 0.2s ease;
|
||||
transition: background-color 0.3s ease;
|
||||
cursor: default;
|
||||
border-radius: 14px;
|
||||
|
||||
&:hover {
|
||||
background: rgba(44, 44, 44, 0.466);
|
||||
.control-bar {
|
||||
&-show {
|
||||
opacity: 1;
|
||||
@@ -670,7 +683,7 @@ body {
|
||||
--highlight-color: #1db954;
|
||||
--control-bg: rgba(124, 124, 124, 0.3);
|
||||
&:hover {
|
||||
background: rgba(44, 44, 44, 0.466);
|
||||
background: rgba(44, 44, 44, 0.466) !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -680,7 +693,7 @@ body {
|
||||
--highlight-color: #1db954;
|
||||
--control-bg: rgba(255, 255, 255, 0.3);
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.434);
|
||||
background: rgba(0, 0, 0, 0.434) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user