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

Fix: Increase height of 'About' window #1737

Merged
merged 5 commits into from
Nov 26, 2019
Merged

Fix: Increase height of 'About' window #1737

merged 5 commits into from
Nov 26, 2019

Conversation

akaustav
Copy link
Contributor

What is the purpose of this pull request?

  • Bug fix

What changes did you make?
Increased the height of the About WebTorrent window which shows when you click Help > About WebTorrent.

Which issue (if any) does this pull request address?
#1736

Is there anything you'd like reviewers to focus on?

  • Tested in Windows 10 (64 bit) only.
  • Need help testing in other supported platforms.
  • Need instructions/help to update unit tests, and/or end-to-end tests.

Screenshot
image

@mathiasvr
Copy link
Contributor

mathiasvr commented Oct 30, 2019

This about window is only used on Windows and Linux, on macOS the native about role is used instead, and looks like this:

Screenshot 2019-10-30 at 12 34 30

I see the Copyright notice is missing for the other platforms, it would be great if you could add it as well @akaustav.

Edit: Just noticed we already had the copyright notice, but there was an error in the path, so took the liberty to fix it on your branch.

@akaustav
Copy link
Contributor Author

akaustav commented Oct 31, 2019

Cool, thanks @mathiasvr. I confirm that the copyright information is available in the window now. However, 220 height was not sufficient to display the copyright line. So, I had to increase the height even further. After changing the height to 250, it looks like this in Windows 10:

image

@akaustav
Copy link
Contributor Author

Also, I see that the lines related to Help menu in Windows and Linux:

// Help menu (Windows, Linux)
template[5].submenu.push(
{
type: 'separator'
},
{
label: 'About ' + config.APP_NAME,
click: () => windows.about.init()
}
)

Also, like @mathiasvr said, here is the code snippet for Mac (Darwin):

if (process.platform === 'darwin') {
// WebTorrent menu (Mac)
template.unshift({
label: config.APP_NAME,
submenu: [
{
role: 'about'
},

However, I fail to understand what controls the height of the about dialog in macOS. Does macOS automatically adjust the window width and height to accommodate the contents? Or is there a setting in a configuration file somewhere?

Also, would you think it is a good idea to keep the dimensions of the About window/dialog box consistent across multiple platforms?

@mathiasvr
Copy link
Contributor

@akaustav On mac the about window is populated with info from the packaging process, and I believe you are correct that the dimensions are automatically adjusted.

I think dimensions should be the same across platforms, but it's more important to have a consistent look.
I tried displaying the Windows/Linux about window on mac and I get this:

Screenshot 2019-10-31 at 17 55 05

It's weird that there is such a big difference between macOS and Windows? However, as long as it looks good in Windows and Linux it's fine since we don't use this window on mac.

@hicom150
Copy link
Contributor

This fix looks great, but I found two small issues 😅

I will add this corrections in the following commit 👍

@hicom150 hicom150 merged commit 82f8732 into webtorrent:master Nov 26, 2019
@hicom150
Copy link
Contributor

Good work @akaustav and @mathiasvr 🎉

@mathiasvr
Copy link
Contributor

Thanks @hicom150, nice catches 👍

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.

4 participants