Open ralish opened 2 years ago
Microsoft says that the dimensions of that image are 48x48 and we should provide versions for 100%, 125%, 150%, 200%, and 400% scaling.
The icon we use is our standard git-for-windows.ico
, which contains versions of the logo in 16x16, 32x32 and 48x48, for 100%, 125%, 150%, 175%, 200%, 250%, 300%, 350%, 400%, 450% and 500%. So we should theoretically be good. But I think I've also experienced this in practice, so I'm not sure what's happening here.
@rimrul So my read of that documentation is that at 400% scaling the icon (app logo) should be 192 x 192. From a quick look at the code, this appears to be what's responsible for launching the toast notification: https://github.com/git-for-windows/build-extra/blob/f25e8f8602e1d37416bf774169592e6ed7cf390a/git-extra/git-update-git-for-windows#L297-L301
But that's just using the standard git-for-windows.ico
icon which is 16 x 16 pixels (apparently I'm well calibrated to image dimensions!). There's nothing there I can see which is changing the icon by display scaling, and it's the only icon at that path.
@rimrul So my read of that documentation is that at 400% scaling the icon (app logo) should be 192 x 192.
That math sounds correct.
From a quick look at the code, this appears to be what's responsible for launching the toast notification: https://github.com/git-for-windows/build-extra/blob/f25e8f8602e1d37416bf774169592e6ed7cf390a/git-extra/git-update-git-for-windows#L297-L301
That's correct.
But that's just using the standard
git-for-windows.ico
icon
That's also correct.
which is 16 x 16 pixels
That's incorrect. Or at least incomplete.
The ICO file format is an image file format for computer icons in Microsoft Windows. ICO files contain one or more small images at multiple sizes and color depths, such that they may be scaled appropriately.
(From https://en.wikipedia.org/wiki/ICO_(file_format))
.ico
files can contain multiple resolutions of an image, and this one does. There's 16x16, 20x20, 24x24, 28x28, 32x32, 40x40, 48x48, 56x56, 60x60, 64x64, 72x72, 80x80, 84x84, 96x96, 112x112, 120x120, 128x128, 144x144, 160x160, 168x168, 192x192, 216x216, 240x240 and IIRC also 256x256 and 512x512 in there. Windows should automatically pick the appropriate one (or scale one down if it can't find the perfect one), but apparently sometimes fails to do that.
sometimes fails to do that.
Scratch that, it seems to reliably fail every time on Windows 11.
Was there ever any conclusion? If not, let's just close this here ticket.
Setup
High-DPI display with resolution of 3840 x 2160.
Details
Primarily PowerShell under Windows Terminal.
Git icon in appropriately high resolution.
Git icon which looks like a 16 x 16 bitmap ;)
Obviously only a cosmetic issue, but hopefully a relatively easy one to fix.