1.1.33.00 tray icon no longer pick 16x16 icon automatically Topic is solved

Report problems with documented functionality
User avatar
uname
Posts: 23
Joined: 25 Oct 2013, 12:50

1.1.33.00 tray icon no longer pick 16x16 icon automatically

01 Jul 2020, 01:50

Code: Select all

Menu, Tray, Icon, % executable_path, 1
Prior to 1.1.33.00 the lowest resolution icon from file was used, but since the update the script automatically pick the largest one.
Is that intentional? High resolution icon isn't the most suitable as a tray icon, it's way too detailed.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: 1.1.33.00 tray icon no longer pick 16x16 icon automatically

01 Jul 2020, 03:57

It is designed to pick a close match, preferring the next larger icon if an exact match is not available. For instance, my DPI is set to 125%, therefore the "small icon size" is 20x20, and the icon loading procedure will prefer to downscale a 32x32 icon over upscaling a 16x16 one. I have confirmed that it still behaves as intended in v1.1.33.00, selecting the 32x32 icon even though 48x48, 96x96 and 256x256 icons precede it.

One thing that did change: if a 256x256 icon is considered the best match (because the next size down is too small), it will be selected. This never happened in previous versions, because the icon size fields actually contain 0 (being 8-bit integers, they cannot contain 256).

If you have a problem, post files that demonstrate it.
bodys
Posts: 3
Joined: 21 Apr 2019, 21:59

Re: 1.1.33.00 tray icon no longer pick 16x16 icon automatically

12 Jul 2020, 23:25

I created 16x16 and 20x20 multi-icon for demonstration.
testicon.zip
(2.45 KiB) Downloaded 49 times

Code: Select all

Menu, Tray, Icon, test.ico, 1
When atattched this icon file directly, 16x16 icon is selected in 100% DPI and 20x20 icon is selected in 125% DPI.

Code: Select all

Menu, Tray, Icon, % executable_path, 1
But when atattched same icon file that implemented in executable file (by Resource Hacker), 20x20 icon is selected in 100% and 125% DPI.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: 1.1.33.00 tray icon no longer pick 16x16 icon automatically

13 Jul 2020, 00:04

Thanks. The bug is that the first icon (not necessarily 16x16) is always considered the worst match. It won't pick the largest unless that's the next best match.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 94 guests