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 = () => {
|
export const initGlobalData = () => {
|
||||||
const envParams = parseEnvParams()
|
const envParams = parseEnvParams()
|
||||||
|
envParams.cmdParams.dt = !!envParams.cmdParams.dt
|
||||||
|
|
||||||
global.envParams = {
|
global.envParams = {
|
||||||
cmdParams: envParams.cmdParams,
|
cmdParams: envParams.cmdParams,
|
||||||
deeplink: envParams.deeplink,
|
deeplink: envParams.deeplink,
|
||||||
|
|
|
@ -77,6 +77,7 @@ export const createWindow = async(userApi: LX.UserApi.UserApiInfo) => {
|
||||||
minimizable: false,
|
minimizable: false,
|
||||||
maximizable: false,
|
maximizable: false,
|
||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
|
roundedCorners: false,
|
||||||
hasShadow: false,
|
hasShadow: false,
|
||||||
show: false,
|
show: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
|
|
@ -127,6 +127,7 @@ export const createWindow = () => {
|
||||||
minimizable: false,
|
minimizable: false,
|
||||||
maximizable: false,
|
maximizable: false,
|
||||||
fullscreenable: false,
|
fullscreenable: false,
|
||||||
|
roundedCorners: false,
|
||||||
show: false,
|
show: false,
|
||||||
alwaysOnTop: isAlwaysOnTop,
|
alwaysOnTop: isAlwaysOnTop,
|
||||||
skipTaskbar: !isShowTaskbar,
|
skipTaskbar: !isShowTaskbar,
|
||||||
|
|
|
@ -87,7 +87,7 @@ export const createWindow = () => {
|
||||||
resizable: false,
|
resizable: false,
|
||||||
maximizable: false,
|
maximizable: false,
|
||||||
fullscreenable: true,
|
fullscreenable: true,
|
||||||
roundedCorners: false,
|
roundedCorners: global.envParams.cmdParams.dt,
|
||||||
show: false,
|
show: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
session: ses,
|
session: ses,
|
||||||
|
@ -109,7 +109,7 @@ export const createWindow = () => {
|
||||||
browserWindow = new BrowserWindow(options)
|
browserWindow = new BrowserWindow(options)
|
||||||
|
|
||||||
const winURL = process.env.NODE_ENV !== 'production' ? 'http://localhost:9080' : `file://${path.join(encodePath(__dirname), 'index.html')}`
|
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()
|
winEvent()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue