feat: add about panel customization on Windows by erickzhao · Pull Request #19420 · electron/electron · GitHub
Skip to content

feat: add about panel customization on Windows#19420

Merged
codebytere merged 13 commits into
masterfrom
intern/windows-about
Aug 12, 2019
Merged

feat: add about panel customization on Windows#19420
codebytere merged 13 commits into
masterfrom
intern/windows-about

Conversation

@erickzhao

@erickzhao erickzhao commented Jul 24, 2019

Copy link
Copy Markdown
Member

Description of Change

Closes #15591. Adds support for showAboutPanel() and setAboutPanelOptions() on Windows.

Windows doesn't have a native About dialog. This PR reuses the electron::ShowMessageBox function to generate a dialog with the About Panel information as a string message.

Notes:

  • Default settings are the applicationName and applicationVersion provided by /src/base/file_version_info.h.
  • The image path accepts any file types that NativeImage API does.
  • The About panel is synchronous (same as on Linux).

Fields added (all optional):

  • applicationName: string
  • applicationVersion: string
  • copyright: string
  • credits: string
  • iconPath: string

cc @codebytere @ckerr @sindresorhus

Example

image

Additional Reading

Microsoft UX Guidelines for Dialog Boxes: https://docs.microsoft.com/en-us/windows/win32/uxguide/win-dialog-box

Relevant bits:

  • Use an icon in About Box dialogs for application branding.
    About Dialog Example
    In this example, a bitmap is used in the About Box to identify and brand the application.

Checklist

Release Notes

Notes: Added about panel customization on Windows.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Jul 24, 2019
@deermichel deermichel force-pushed the intern/windows-about branch 2 times, most recently from 4fbbc47 to d5fbbec Compare July 24, 2019 21:39
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Jul 25, 2019
@codebytere

Copy link
Copy Markdown
Member

@erickzhao

erickzhao commented Jul 30, 2019

Copy link
Copy Markdown
Member Author

@erickzhao this is blocked on #19460, right?

@codebytere yep! I was waiting for that one to get merged to avoid having to re-implement all the business logic available in AddImageSkiaRepFromPath and its helpers.

@erickzhao erickzhao force-pushed the intern/windows-about branch from 63ae694 to 49ad7d5 Compare July 30, 2019 21:44
@erickzhao erickzhao changed the title [WIP] feat: add about panel customization on windows feat: add about panel customization on Windows Jul 31, 2019
@erickzhao erickzhao force-pushed the intern/windows-about branch from 65cd83a to 752cddb Compare July 31, 2019 21:27
Comment thread shell/browser/browser_win.cc Outdated
@erickzhao erickzhao changed the title feat: add about panel customization on Windows [WIP] feat: add about panel customization on Windows Aug 2, 2019
@erickzhao erickzhao changed the title [WIP] feat: add about panel customization on Windows feat: add about panel customization on Windows Aug 8, 2019
@erickzhao

Copy link
Copy Markdown
Member Author

Update: added default values for applicationName and applicationVersion based on existing Chromium APIs. :)

@deermichel deermichel self-requested a review August 9, 2019 18:53

@deermichel deermichel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm & works for me.

Are you aware that the dialog's title will be derived from app.name?

@erickzhao

Copy link
Copy Markdown
Member Author

Are you aware that the dialog's title will be derived from app.name?
Should be okay this way!

@codebytere codebytere merged commit f654da9 into master Aug 12, 2019
@release-clerk

release-clerk Bot commented Aug 12, 2019

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-platform 'About' window

4 participants