Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add about panel customization on Windows #19420

Merged
merged 13 commits into from Aug 12, 2019
Merged

Conversation

erickzhao
Copy link
Member

@erickzhao erickzhao commented Jul 24, 2019

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 in the last 24 hours 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 in the last 24 hours label Jul 25, 2019
@codebytere
Copy link
Member

@erickzhao this is blocked on #19460, right?

@erickzhao
Copy link
Member Author

erickzhao commented Jul 30, 2019

@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 changed the title [WIP] feat: add about panel customization on windows feat: add about panel customization on Windows Jul 31, 2019
shell/browser/browser_win.cc Outdated Show resolved Hide resolved
@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
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
Copy link
Contributor

@deermichel deermichel left a comment

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
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
Copy link

release-clerk bot commented Aug 12, 2019

Release Notes Persisted

Added about panel customization on Windows.

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