Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2002-01-25 21:10:57 +0000
committerSilenio Quarti2002-01-25 21:10:57 +0000
commitfb27605b11adabff0bdf825e06bac72a3c047f77 (patch)
tree2bb8652cf7d372523267571298f0250e9a16d301
parent040bde4a2b171453b3d396332ab9084b78f379a0 (diff)
downloadeclipse.platform.swt-fb27605b11adabff0bdf825e06bac72a3c047f77.tar.gz
eclipse.platform.swt-fb27605b11adabff0bdf825e06bac72a3c047f77.tar.xz
eclipse.platform.swt-fb27605b11adabff0bdf825e06bac72a3c047f77.zip
black is transparent
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.c8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java1
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ImageList.java8
-rw-r--r--bundles/org.eclipse.swt/ws/win32/swt-win32-2023.dllbin262144 -> 262144 bytes
4 files changed, 16 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.c
index 5c6c9e7adf..5456a93de8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/swt.c
@@ -3073,6 +3073,14 @@ JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_win32_OS_HideCaret
return (jboolean)HideCaret((HWND)arg0);
}
+JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_ImageList_1Add
+ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
+{
+ DEBUG_CALL("ImageList_Add\n")
+
+ return (jint)ImageList_Add((HIMAGELIST)arg0, (HBITMAP)arg1, (HBITMAP)arg2);
+}
+
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_win32_OS_ImageList_1AddMasked
(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
{
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
index ad0ac97b7e..36a56723e3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
@@ -2015,6 +2015,7 @@ public static final native boolean GradientFill(int hdc, int pVertex, int dwNumV
public static final native int HeapAlloc (int hHeap, int dwFlags, int dwBytes);
public static final native boolean HeapFree (int hHeap, int dwFlags, int lpMem);
public static final native boolean HideCaret (int hWnd);
+public static final native int ImageList_Add (int himl, int hbmImage, int hbmMask);
public static final native int ImageList_AddMasked (int himl, int hbmImage, int crMask);
public static final native int ImageList_Create (int cx, int cy, int flags, int cInitial, int cGrow);
public static final native boolean ImageList_Destroy (int himl);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ImageList.java
index 4b6e776552..a859d2af24 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ImageList.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ImageList.java
@@ -77,7 +77,13 @@ public int add (Image image) {
Color color = image.getBackground ();
if (color != null) background = color.handle;
if (index == count) {
- OS.ImageList_AddMasked (handle, hBitmap, background);
+ if (background != -1) {
+ OS.ImageList_AddMasked (handle, hBitmap, background);
+ } else {
+ int hMask = createMask (hBitmap, cx [0], cy [0], background);
+ OS.ImageList_Add (handle, hBitmap, hMask);
+ OS.DeleteObject (hMask);
+ }
} else {
int hMask = createMask (hBitmap, cx [0], cy [0], background);
OS.ImageList_Replace (handle, index, hBitmap, hMask);
diff --git a/bundles/org.eclipse.swt/ws/win32/swt-win32-2023.dll b/bundles/org.eclipse.swt/ws/win32/swt-win32-2023.dll
index c037bdbd3e..a39da3bb29 100644
--- a/bundles/org.eclipse.swt/ws/win32/swt-win32-2023.dll
+++ b/bundles/org.eclipse.swt/ws/win32/swt-win32-2023.dll
Binary files differ

Back to the top