Commit c61529c
committed
[Win32] Improve decorations/shell images size selection
The algorithm to identify the best fitting image set to a
decorations/shell instance for a specific size required by the OS
currently only considers the difference between the target size and the
actual size of the image. Smaller and larger images with the same
difference are treated equally. However, usually one wants to prefer
downscaling a higher-resolution image than upscaling a lower-resolution
one to improve the quality.
This change ensures that larger images are preferred over smaller images
if the difference is 1.5 times as high or less. One particular change is
that on a 150% monitor now a 200% image will be downscaled instead of
upscaling a 100% image.1 parent f6de513 commit c61529c
File tree
1 file changed
+16
-6
lines changed- bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets
1 file changed
+16
-6
lines changedLines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
954 | 964 | | |
955 | 965 | | |
956 | 966 | | |
| |||
0 commit comments