优化默认设置

pull/277/head
lyswhut 2020-06-26 00:17:09 +08:00
parent e29d3e3eaa
commit b02d32929c
3 changed files with 11 additions and 12 deletions

View File

@ -24,11 +24,6 @@ module.exports = {
name: hotKeyCommon.focusSearchInput.name, name: hotKeyCommon.focusSearchInput.name,
action: hotKeyCommon.focusSearchInput.action, action: hotKeyCommon.focusSearchInput.action,
}, },
'mod+w': {
type: hotKeyCommon.min.type,
name: hotKeyCommon.min.name,
action: hotKeyCommon.min.action,
},
}, },
}, },
global: { global: {

View File

@ -17,14 +17,14 @@ const defaultSetting = {
enable: false, enable: false,
isLock: false, isLock: false,
isAlwaysOnTop: false, isAlwaysOnTop: false,
width: 600, width: 380,
height: 700, height: 420,
x: -1, x: null,
y: -1, y: null,
theme: 0, theme: 0,
style: { style: {
fontSize: 125, fontSize: 120,
opacity: 80, opacity: 95,
isZoomActiveLrc: true, isZoomActiveLrc: true,
}, },
}, },

View File

@ -72,10 +72,14 @@ const createWindow = () => {
if (global.modules.lyricWindow) return if (global.modules.lyricWindow) return
if (!global.appSetting.desktopLyric.enable) return if (!global.appSetting.desktopLyric.enable) return
// const windowSizeInfo = getWindowSizeInfo(global.appSetting) // const windowSizeInfo = getWindowSizeInfo(global.appSetting)
const { x, y, width, height, isAlwaysOnTop } = global.appSetting.desktopLyric let { x, y, width, height, isAlwaysOnTop } = global.appSetting.desktopLyric
let { width: screenWidth, height: screenHeight } = global.envParams.workAreaSize let { width: screenWidth, height: screenHeight } = global.envParams.workAreaSize
screenWidth += 16 screenWidth += 16
screenHeight += 16 screenHeight += 16
if (x == null) {
x = screenWidth - width - 8
y = screenHeight - height - 8
}
/** /**
* Initial window options * Initial window options
*/ */