Skip to content

No close button in message box with a parent window #2293

@etiktin

Description

@etiktin

This is how an alert dialog looks like in v0.29.2 on Windows:
alertonv29 2

And this is how it looks like in v0.30.0:
alertonv30

In version v0.30.0 we moved to using native dialogs which explains the different look.

The issues with this are:

  1. The new alert dialog no longer shows a close button (X). In most Windows apps, when you see a message box or a task dialog, it will have action buttons, but also the close button which is mapped to the default action (usually "Cancel" or "OK").
  2. The default caption of the dialog is the executable name (e.g. "electron.exe"). I think it makes more sense to use "productName".
  3. The style of the new dialogs is somewhat outdated (not "clean and flat" enough). In Windows 8, Microsoft added a MessageDialog API that replaces the MessageBox and TaskDialog APIs for modern apps (see examples at: https://msdn.microsoft.com/en-us/library/windows/apps/hh738363#appropriate_use). Electron is not a modern/metro app so it can't access the new dialogs (and they are not available in Windows 7), but maybe we can simulate them. The Windows Github app which is a regular desktop app, displays dialogs that use the new style. Is it possible to get Electron to use the same?

Here's how dialogs look like in Github for Windows:
github_dialog example

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions