Commit c012752
committed
[Win32] Avoid faulty setting of image list at OS on Tree.setOrientation
The Windows Tree implementation only registers an image list at the OS
control in case an image is set in the first column of an item of the
tree. For images in the other columns, they are added to an SWT image
list but since the images are embedded by SWT, no image list is
registered at the OS.
The implementation of Tree.updateOrientation() does not consider that
for the OS control no image list may have been set even if the SWT
control manages an image list. As a consequence, calling
Tree.setOrientation() on a Tree whose items do not have any image in the
first column leads to all those items receiving a white space where an
image might be placed as an empty image list is registered at the OS.
This change adapts the Tree.updateOrientation() implementation to only
refresh the OS image list for the control in case one was already set
before. In addition to calling Tree.setOrientation() this also affects
DPI changes when moving the containing shell to a monitor with a
different zoom where the same happens because of a call to
Tree.updateOrientation().
Contributes to
#30751 parent 3e1cc4f commit c012752
1 file changed
Lines changed: 6 additions & 2 deletions
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5805 | 5805 | | |
5806 | 5806 | | |
5807 | 5807 | | |
5808 | | - | |
5809 | | - | |
| 5808 | + | |
| 5809 | + | |
| 5810 | + | |
| 5811 | + | |
| 5812 | + | |
| 5813 | + | |
5810 | 5814 | | |
5811 | 5815 | | |
5812 | 5816 | | |
| |||
0 commit comments