[Win32] Update images of tree columns upon DPI change #3076
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When moving a shell with a tree that uses images in any other than the first column to another monitor, those images will be lost in case the other monitor has a different zoom such that the UI is rescaled. The reason is that the DPI change handling for TreeItem does not consider the other images of the tree item at all.
This change explicitly resets all images of a tree item upon DPI change.
Fixes #3075
Remaining limitation
One limitation is that if an item does not have an image set for the first column, there will be blank space where the image could be after rescaling. This will be fixed independently via:
Before rescaling:

After rescaling:

This is, however, an issue that already happens now (without any rescaling) in case the item has a subitems that uses an image in the first column:

And it also happens if you set and then remove an image, like this: