Skip to content

Commit

Permalink
Show about window on active window (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
mquevill authored Apr 24, 2021
1 parent e73e150 commit 628bcd3
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}) => {
Expand Down

0 comments on commit 628bcd3

Please sign in to comment.