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
3gf8jv4dv 2025-04-19 19:54:43 +08:00 committed by GitHub
parent 03bba4259e
commit c2341d6697
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 2 deletions

View File

@ -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,

View File

@ -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: {

View File

@ -127,6 +127,7 @@ export const createWindow = () => {
minimizable: false,
maximizable: false,
fullscreenable: false,
roundedCorners: false,
show: false,
alwaysOnTop: isAlwaysOnTop,
skipTaskbar: !isShowTaskbar,

View File

@ -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()