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

[Regression] Window bar app icon is low quality again #7361

Closed
TheRealDannyyy opened this issue Feb 7, 2020 · 19 comments
Closed

[Regression] Window bar app icon is low quality again #7361

TheRealDannyyy opened this issue Feb 7, 2020 · 19 comments

Comments

@TheRealDannyyy
Copy link

NWJS Version: v0.44.0
Operating System: Windows 10

Expected behavior

High quality icon should be set like in the task bar.

Actual behavior

Low quality icon is being used in window bar
image

How to reproduce

Download Construct 3 Desktop and just run it on a Windows 10 system.

@TheRealDannyyy
Copy link
Author

Seems like NW2 is causing this, so tagging #7230

@panther7
Copy link

panther7 commented Feb 17, 2020

+1

Maybe related issue: #7379

@rogerwang
Copy link
Member

It works for me with this sample:

https://github.com/rogerwang/4581-icon

icon-window

@TheRealDannyyy
Copy link
Author

Nope. Your sample is also looking crusty.
image

@panther7
Copy link

panther7 commented Feb 27, 2020

Agreed, icon has "sharp" render.

Check screenshots inside this issue: #7379 (comment).

@rogerwang

@rogerwang
Copy link
Member

@TheRealDannyyy could you attach a picture with the good icon of my sample project?

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Mar 2, 2020

Here it is in NW1 mode:
image

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented Apr 7, 2020

@rogerwang Any progress on this minor issue?

I'm not sure if I can provide more info for reproduction. Disabling NW2 should give a good comparison between icon qualities. Would be great if we can get this fixed for the next major release.

@rogerwang
Copy link
Member

rogerwang commented May 28, 2020

I still can't reproduce this issue. I zoomed in with your uploaded screenshots and the NW2 icon looks better:

nw2:
屏幕快照 2020-05-28 下午5 32 13
nw1:
屏幕快照 2020-05-28 下午5 32 03

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented May 28, 2020

@rogerwang the problem is that NW2 sharpens the icon, instead of the usual behavior (see NW1 behavior). This can in some cases look better but in most cases, just reduces the quality of icons and makes them look "over-sharpened" to users.

@rogerwang
Copy link
Member

Could you provide a sample of reduced quality?

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented May 28, 2020

Here is another test example (download: icon comparison.zip):
NWIcon Comparison


You can also visit Construct 3 https://editor.construct.net/ in both Chrome and NWjs to see the obvious difference in quality (sharpness) between icons:
image

@rogerwang
Copy link
Member

Can you confirm the regression happens first in 0.43.5? I have a sample suggests this.

Your sample doesn't look obvious here and the construct 3 website doesn't show with any favicon when I load it in NW with nw.exe --url= ...

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented May 28, 2020

Construct 3 Download: https://downloads.scirra.com/c3-desktop/c3-nwjs-package-beta.zip

The regression happens first in 0.42.4, which is also when NW2 got released. I think this issue might be caused by Chrome's Windows 10 custom titlebar implementation.

@rogerwang
Copy link
Member

I didn't try the c3 package because it's a complex application and the window icon can be affected in various places. It would be helpful if you can extract the icon from it and confirm that with the simple sample ...

@TheRealDannyyy
Copy link
Author

TheRealDannyyy commented May 28, 2020

With the C3 icon and your provided sample: NW2_C3.zip

Same results:
image

@rogerwang
Copy link
Member

I just made some adjustments to the drawing code of the custom title bar. But it can't be identical to the system native titlebar as the icon is resized and drawn by system GUI code in that case, while with custom titlebar the icon is shrinked and drawed by skia, which in turn uses GPU shader to draw the image.

For finer control on this I suggest using a 1:1 small icon picture, or use the native titlebar.

@TheRealDannyyy
Copy link
Author

Thanks! Will review it when it's live.

@TheRealDannyyy
Copy link
Author

Tested and works fine in NWjs 0.46.1, thanks for the fix!

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

No branches or pull requests

3 participants