优化默认设置

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,
action: hotKeyCommon.focusSearchInput.action,
},
'mod+w': {
type: hotKeyCommon.min.type,
name: hotKeyCommon.min.name,
action: hotKeyCommon.min.action,
},
},
},
global: {

View File

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

View File

@ -72,10 +72,14 @@ const createWindow = () => {
if (global.modules.lyricWindow) return
if (!global.appSetting.desktopLyric.enable) return
// 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
screenWidth += 16
screenHeight += 16
if (x == null) {
x = screenWidth - width - 8
y = screenHeight - height - 8
}
/**
* Initial window options
*/