桌面歌词新增在任务栏显示歌词进程设置(#1063)
parent
67a3ab164a
commit
9e51a55d45
|
@ -18,6 +18,7 @@
|
|||
- 桌面歌词新增竖排歌词显示功能(#971)
|
||||
- 桌面歌词新增歌词对齐方式、是否不允许歌词换行、歌词颜色、滚动对齐方式、歌词间距设置
|
||||
- 桌面歌词新增歌曲频谱显示(得益于主窗口与桌面歌词进程通信的改进,可以将此功能以CPU使用率“相对较低”的方式带到桌面歌词中)
|
||||
- 桌面歌词新增在任务栏显示歌词进程设置(此设置用于在录屏软件无法捕获歌词窗口时的变通解决方法)(#1063)
|
||||
- 添加kg源罗马音歌词的支持
|
||||
- 支持打开波点音乐歌单(需在酷我源打开)
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ const defaultSetting: LX.AppSetting = {
|
|||
'desktopLyric.isLock': false,
|
||||
'desktopLyric.isAlwaysOnTop': false,
|
||||
'desktopLyric.isAlwaysOnTopLoop': false,
|
||||
'desktopLyric.isShowTaskbar': false,
|
||||
'desktopLyric.audioVisualization': false,
|
||||
'desktopLyric.width': 450,
|
||||
'desktopLyric.height': 300,
|
||||
|
|
|
@ -189,6 +189,11 @@ declare global {
|
|||
*/
|
||||
'desktopLyric.isAlwaysOnTopLoop': boolean
|
||||
|
||||
/**
|
||||
* 是否将歌词进程显示在任务栏
|
||||
*/
|
||||
'desktopLyric.isShowTaskbar': boolean
|
||||
|
||||
/**
|
||||
* 是否启用音频可视化
|
||||
*/
|
||||
|
|
|
@ -5,6 +5,7 @@ declare namespace LX {
|
|||
'desktopLyric.isLock': LX.AppSetting['desktopLyric.isLock']
|
||||
'desktopLyric.isAlwaysOnTop': LX.AppSetting['desktopLyric.isAlwaysOnTop']
|
||||
'desktopLyric.isAlwaysOnTopLoop': LX.AppSetting['desktopLyric.isAlwaysOnTopLoop']
|
||||
'desktopLyric.isShowTaskbar': LX.AppSetting['desktopLyric.isShowTaskbar']
|
||||
'desktopLyric.audioVisualization': LX.AppSetting['desktopLyric.audioVisualization']
|
||||
'desktopLyric.width': LX.AppSetting['desktopLyric.width']
|
||||
'desktopLyric.height': LX.AppSetting['desktopLyric.height']
|
||||
|
|
|
@ -322,6 +322,7 @@
|
|||
"setting__desktop_lyric_scroll_align_center": "Center",
|
||||
"setting__desktop_lyric_scroll_align_top": "Top",
|
||||
"setting__desktop_lyric_shadow_color": "Shadow color",
|
||||
"setting__desktop_lyric_show_taskbar": "Display lyrics progress on the taskbar (this setting is used as a workaround when the screen recording software cannot capture the lyrics window)",
|
||||
"setting__desktop_lyric_unplay_color": "Color not playing",
|
||||
"setting__download": "Download",
|
||||
"setting__download_data_embed": "Whether to embed the following content in the audio file",
|
||||
|
@ -512,6 +513,7 @@
|
|||
"theme_blue": "Blue",
|
||||
"theme_blue2": "Purple Blue",
|
||||
"theme_blue_plus": "Blue Plus",
|
||||
"theme_china_ink": "China Ink",
|
||||
"theme_edit_modal__app_bg": "Apply background color",
|
||||
"theme_edit_modal__aside_color": "Sidebar button color",
|
||||
"theme_edit_modal__badge": "Label color",
|
||||
|
@ -551,7 +553,6 @@
|
|||
"theme_pink": "Pink",
|
||||
"theme_purple": "Purple",
|
||||
"theme_red": "Red",
|
||||
"theme_china_ink": "China Ink",
|
||||
"theme_selector_modal__dark_title": "dark theme",
|
||||
"theme_selector_modal__light_title": "Bright theme",
|
||||
"theme_selector_modal__theme_name": "Topic name",
|
||||
|
|
|
@ -324,6 +324,7 @@
|
|||
"setting__desktop_lyric_scroll_align_center": "中心",
|
||||
"setting__desktop_lyric_scroll_align_top": "顶部",
|
||||
"setting__desktop_lyric_shadow_color": "阴影颜色",
|
||||
"setting__desktop_lyric_show_taskbar": "在任务栏显示歌词进程(此设置用于在录屏软件无法捕获歌词窗口时的变通解决方法)",
|
||||
"setting__desktop_lyric_unplay_color": "未播放颜色",
|
||||
"setting__download": "下载设置",
|
||||
"setting__download_data_embed": "是否将以下内容嵌入到音频文件中",
|
||||
|
@ -514,6 +515,7 @@
|
|||
"theme_blue": "蓝田生玉",
|
||||
"theme_blue2": "清热版蓝",
|
||||
"theme_blue_plus": "蛋雅深蓝",
|
||||
"theme_china_ink": "近墨者黑",
|
||||
"theme_edit_modal__app_bg": "应用背景颜色",
|
||||
"theme_edit_modal__aside_color": "侧栏按钮颜色",
|
||||
"theme_edit_modal__badge": "标签颜色",
|
||||
|
@ -553,7 +555,6 @@
|
|||
"theme_pink": "粉装玉琢",
|
||||
"theme_purple": "重斤球紫",
|
||||
"theme_red": "热情似火",
|
||||
"theme_china_ink": "近墨者黑",
|
||||
"theme_selector_modal__dark_title": "暗色主题",
|
||||
"theme_selector_modal__light_title": "亮色主题",
|
||||
"theme_selector_modal__theme_name": "主题名称",
|
||||
|
|
|
@ -323,6 +323,7 @@
|
|||
"setting__desktop_lyric_scroll_align_center": "中心",
|
||||
"setting__desktop_lyric_scroll_align_top": "頂部",
|
||||
"setting__desktop_lyric_shadow_color": "陰影顏色",
|
||||
"setting__desktop_lyric_show_taskbar": "在任務欄顯示歌詞進程(此設置用於在錄屏軟件無法捕獲歌詞窗口時的變通解決方法)",
|
||||
"setting__desktop_lyric_unplay_color": "未播放顏色",
|
||||
"setting__download": "下載設置",
|
||||
"setting__download_data_embed": "是否將以下內容嵌入到音頻文件中",
|
||||
|
@ -512,6 +513,7 @@
|
|||
"theme_blue": "藍田生玉",
|
||||
"theme_blue2": "清熱版藍",
|
||||
"theme_blue_plus": "蛋雅深藍",
|
||||
"theme_china_ink": "近墨者黑",
|
||||
"theme_edit_modal__app_bg": "應用背景顏色",
|
||||
"theme_edit_modal__aside_color": "側欄按鈕顏色",
|
||||
"theme_edit_modal__badge": "標籤顏色",
|
||||
|
@ -551,7 +553,6 @@
|
|||
"theme_pink": "粉裝玉琢",
|
||||
"theme_purple": "重斤球紫",
|
||||
"theme_red": "熱情似火",
|
||||
"theme_china_ink": "近墨者黑",
|
||||
"theme_selector_modal__dark_title": "暗色主題",
|
||||
"theme_selector_modal__light_title": "亮色主題",
|
||||
"theme_selector_modal__theme_name": "主題名稱",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { isLinux } from '@common/utils'
|
||||
import { closeWindow, createWindow, getBounds, isExistWindow, alwaysOnTopTools, setBounds, setIgnoreMouseEvents } from './main'
|
||||
import { closeWindow, createWindow, getBounds, isExistWindow, alwaysOnTopTools, setBounds, setIgnoreMouseEvents, setSkipTaskbar } from './main'
|
||||
import { sendConfigChange } from './rendererEvent'
|
||||
import { buildLyricConfig, getLyricWindowBounds, watchConfigKeys } from './utils'
|
||||
|
||||
|
@ -7,6 +7,7 @@ let isLock: boolean
|
|||
let isEnable: boolean
|
||||
let isAlwaysOnTop: boolean
|
||||
let isAlwaysOnTopLoop: boolean
|
||||
let isShowTaskbar: boolean
|
||||
let isLockScreen: boolean
|
||||
let isHoverHide: boolean
|
||||
|
||||
|
@ -37,6 +38,10 @@ export const setLrcConfig = (keys: Array<keyof LX.AppSetting>, setting: Partial<
|
|||
alwaysOnTopTools.startLoop()
|
||||
} else alwaysOnTopTools.clearLoop()
|
||||
}
|
||||
if (keys.includes('desktopLyric.isShowTaskbar') && isShowTaskbar != global.lx.appSetting['desktopLyric.isShowTaskbar']) {
|
||||
isShowTaskbar = global.lx.appSetting['desktopLyric.isShowTaskbar']
|
||||
setSkipTaskbar(!global.lx.appSetting['desktopLyric.isShowTaskbar'])
|
||||
}
|
||||
if (keys.includes('desktopLyric.isAlwaysOnTopLoop') && isAlwaysOnTopLoop != global.lx.appSetting['desktopLyric.isAlwaysOnTopLoop']) {
|
||||
isAlwaysOnTopLoop = global.lx.appSetting['desktopLyric.isAlwaysOnTopLoop']
|
||||
if (!global.lx.appSetting['desktopLyric.isAlwaysOnTop']) return
|
||||
|
|
|
@ -31,6 +31,9 @@ const winEvent = () => {
|
|||
|
||||
browserWindow.on('closed', () => {
|
||||
browserWindow = null
|
||||
if (global.lx.appSetting['desktopLyric.enable']) {
|
||||
global.lx.event_app.update_config({ 'desktopLyric.enable': false })
|
||||
}
|
||||
})
|
||||
|
||||
browserWindow.on('move', () => {
|
||||
|
@ -86,6 +89,7 @@ export const createWindow = () => {
|
|||
let height = global.lx.appSetting['desktopLyric.height']
|
||||
let isAlwaysOnTop = global.lx.appSetting['desktopLyric.isAlwaysOnTop']
|
||||
let isLockScreen = global.lx.appSetting['desktopLyric.isLockScreen']
|
||||
let isShowTaskbar = global.lx.appSetting['desktopLyric.isShowTaskbar']
|
||||
let { width: screenWidth, height: screenHeight } = global.envParams.workAreaSize
|
||||
if (x == null || y == null) {
|
||||
x = screenWidth - width
|
||||
|
@ -122,7 +126,7 @@ export const createWindow = () => {
|
|||
fullscreenable: false,
|
||||
show: false,
|
||||
alwaysOnTop: isAlwaysOnTop,
|
||||
skipTaskbar: true,
|
||||
skipTaskbar: !isShowTaskbar,
|
||||
webPreferences: {
|
||||
contextIsolation: false,
|
||||
webSecurity: false,
|
||||
|
@ -173,6 +177,11 @@ export const setIgnoreMouseEvents = (ignore: boolean, options?: Electron.IgnoreM
|
|||
browserWindow.setIgnoreMouseEvents(ignore, options)
|
||||
}
|
||||
|
||||
export const setSkipTaskbar = (skip: boolean) => {
|
||||
if (!browserWindow) return
|
||||
browserWindow.setSkipTaskbar(skip)
|
||||
}
|
||||
|
||||
export const setAlwaysOnTop = (flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver' | undefined, relativeLevel?: number | undefined) => {
|
||||
if (!browserWindow) return
|
||||
browserWindow.setAlwaysOnTop(flag, level, relativeLevel)
|
||||
|
|
|
@ -80,6 +80,7 @@ export const watchConfigKeys = [
|
|||
'desktopLyric.isLock',
|
||||
'desktopLyric.isAlwaysOnTop',
|
||||
'desktopLyric.isAlwaysOnTopLoop',
|
||||
'desktopLyric.isShowTaskbar',
|
||||
'desktopLyric.audioVisualization',
|
||||
'desktopLyric.width',
|
||||
'desktopLyric.height',
|
||||
|
|
|
@ -5,6 +5,7 @@ export const setting = shallowReactive<LX.DesktopLyric.Config>({
|
|||
'desktopLyric.isLock': false,
|
||||
'desktopLyric.isAlwaysOnTop': false,
|
||||
'desktopLyric.isAlwaysOnTopLoop': false,
|
||||
'desktopLyric.isShowTaskbar': true,
|
||||
'desktopLyric.audioVisualization': false,
|
||||
'desktopLyric.width': 450,
|
||||
'desktopLyric.height': 300,
|
||||
|
|
|
@ -11,6 +11,8 @@ dd
|
|||
base-checkbox(id="setting_desktop_lyric_delayScroll" :modelValue="appSetting['desktopLyric.isDelayScroll']" @update:modelValue="updateSetting({ 'desktopLyric.isDelayScroll': $event })" :label="$t('setting__desktop_lyric_delay_scroll')")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_desktop_lyric_alwaysOnTop" :modelValue="appSetting['desktopLyric.isAlwaysOnTop']" @update:modelValue="updateSetting({ 'desktopLyric.isAlwaysOnTop': $event })" :label="$t('setting__desktop_lyric_always_on_top')")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_desktop_lyric_showTaskbar" :modelValue="appSetting['desktopLyric.isShowTaskbar']" @update:modelValue="updateSetting({ 'desktopLyric.isShowTaskbar': $event })" :label="$t('setting__desktop_lyric_show_taskbar')")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_desktop_lyric_alwaysOnTopLoop" :modelValue="appSetting['desktopLyric.isAlwaysOnTopLoop']" @update:modelValue="updateSetting({ 'desktopLyric.isAlwaysOnTopLoop': $event })" :label="$t('setting__desktop_lyric_always_on_top_loop')")
|
||||
.gap-top
|
||||
|
|
Loading…
Reference in New Issue