Disable rounded corners for lyric window (#2356)
* Disable rounded corners for lyric window Ensure that the lyric window looks the same on Windows 11 as it does on other systems. Ref: https://github.com/electron/electron/issues/46468 * update --------- Co-authored-by: lyswhut <lyswhut@qq.com>pull/2357/head
parent
03bba4259e
commit
c2341d6697
|
@ -14,6 +14,8 @@ import { openDirInExplorer } from '@common/utils/electron'
|
|||
|
||||
export const initGlobalData = () => {
|
||||
const envParams = parseEnvParams()
|
||||
envParams.cmdParams.dt = !!envParams.cmdParams.dt
|
||||
|
||||
global.envParams = {
|
||||
cmdParams: envParams.cmdParams,
|
||||
deeplink: envParams.deeplink,
|
||||
|
|
|
@ -77,6 +77,7 @@ export const createWindow = async(userApi: LX.UserApi.UserApiInfo) => {
|
|||
minimizable: false,
|
||||
maximizable: false,
|
||||
fullscreenable: false,
|
||||
roundedCorners: false,
|
||||
hasShadow: false,
|
||||
show: false,
|
||||
webPreferences: {
|
||||
|
|
|
@ -127,6 +127,7 @@ export const createWindow = () => {
|
|||
minimizable: false,
|
||||
maximizable: false,
|
||||
fullscreenable: false,
|
||||
roundedCorners: false,
|
||||
show: false,
|
||||
alwaysOnTop: isAlwaysOnTop,
|
||||
skipTaskbar: !isShowTaskbar,
|
||||
|
|
|
@ -87,7 +87,7 @@ export const createWindow = () => {
|
|||
resizable: false,
|
||||
maximizable: false,
|
||||
fullscreenable: true,
|
||||
roundedCorners: false,
|
||||
roundedCorners: global.envParams.cmdParams.dt,
|
||||
show: false,
|
||||
webPreferences: {
|
||||
session: ses,
|
||||
|
@ -109,7 +109,7 @@ export const createWindow = () => {
|
|||
browserWindow = new BrowserWindow(options)
|
||||
|
||||
const winURL = process.env.NODE_ENV !== 'production' ? 'http://localhost:9080' : `file://${path.join(encodePath(__dirname), 'index.html')}`
|
||||
void browserWindow.loadURL(winURL + `?os=${getPlatform()}&dt=${!!global.envParams.cmdParams.dt}&dark=${shouldUseDarkColors}&theme=${encodeURIComponent(JSON.stringify(theme))}`)
|
||||
void browserWindow.loadURL(winURL + `?os=${getPlatform()}&dt=${global.envParams.cmdParams.dt}&dark=${shouldUseDarkColors}&theme=${encodeURIComponent(JSON.stringify(theme))}`)
|
||||
|
||||
winEvent()
|
||||
|
||||
|
|
Loading…
Reference in New Issue