From 628bcd31b98a8162969e28730116fb681682de98 Mon Sep 17 00:00:00 2001 From: Michael Quevillon Date: Sat, 24 Apr 2021 07:51:20 -0400 Subject: [PATCH] Show about window on active window (#47) --- index.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/index.js b/index.js index 1d595f2..cc55520 100644 --- a/index.js +++ b/index.js @@ -228,17 +228,20 @@ exports.showAboutWindow = (options = {}) => { const text = options.text ? `${options.copyright ? '\n\n' : ''}${options.text}` : ''; - api.dialog.showMessageBox({ - title: `${options.title} ${appName}`, - message: `Version ${api.app.getVersion()}`, - detail: (options.copyright || '') + text, - icon: options.icon, - - // This is needed for Linux, since at least Ubuntu does not show a close button - buttons: [ - 'OK' - ] - }); + api.dialog.showMessageBox( + activeWindow(), + { + title: `${options.title} ${appName}`, + message: `Version ${api.app.getVersion()}`, + detail: (options.copyright || '') + text, + icon: options.icon, + + // This is needed for Linux, since at least Ubuntu does not show a close button + buttons: [ + 'OK' + ] + } + ); }; exports.aboutMenuItem = (options = {}) => {