fix: fixed an issue if "Always on top" is enabled, the dialog is displayed below the window

- fix #1379
This commit is contained in:
JellyBrick
2023-11-08 16:35:19 +09:00
parent f560b62de0
commit 7bdb46e161
3 changed files with 16 additions and 7 deletions

View File

@ -1,7 +1,7 @@
import { ipcMain, dialog } from 'electron';
import { ipcMain, dialog, BrowserWindow } from 'electron';
export default () => {
ipcMain.handle('qualityChanger', async (_, qualityLabels: string[], currentIndex: number) => await dialog.showMessageBox({
export default (win: BrowserWindow) => {
ipcMain.handle('qualityChanger', async (_, qualityLabels: string[], currentIndex: number) => await dialog.showMessageBox(win, {
type: 'question',
buttons: qualityLabels,
defaultId: currentIndex,