Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Nemkin2018-04-17 12:59:21 +0000
committerNiraj Modi2018-05-03 08:18:06 +0000
commit0fcc40f73f7b6cf079f4211b7bab6c91c2bc977e (patch)
treeb0812403deff7513877f87cabd630a08779fe925 /bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
parent9ee8b1444497d29c83291d4df9544a3f4d627fd3 (diff)
downloadeclipse.platform.swt-0fcc40f73f7b6cf079f4211b7bab6c91c2bc977e.tar.gz
eclipse.platform.swt-0fcc40f73f7b6cf079f4211b7bab6c91c2bc977e.tar.xz
eclipse.platform.swt-0fcc40f73f7b6cf079f4211b7bab6c91c2bc977e.zip
Bug 184951 - [Win32] Tree/Table checkboxes render jagged at a high DPI
DrawThemeBackground stretches the checkbox bitmap to fill the provided rectangle. To avoid stretching artifacts, limit the rectangle to actual checkbox bitmap size. This change also supersedes the fix for bug 489828. Change-Id: Ib227b874716b7858dc52596c5103ceb598e68cbb Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
index 6252d862d8..978d8e67f3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
@@ -4963,6 +4963,32 @@ fail:
}
#endif
+#ifndef NO_GetThemePartSize
+JNIEXPORT jint JNICALL OS_NATIVE(GetThemePartSize)
+ (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jint arg5, jobject arg6)
+{
+ RECT _arg4, *lparg4=NULL;
+ SIZE _arg6, *lparg6=NULL;
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, GetThemePartSize_FUNC);
+ if (arg4) if ((lparg4 = getRECTFields(env, arg4, &_arg4)) == NULL) goto fail;
+ if (arg6) if ((lparg6 = &_arg6) == NULL) goto fail;
+/*
+ rc = (jint)GetThemePartSize(arg0, arg1, arg2, arg3, lparg4, arg5, lparg6);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, GetThemePartSize)
+ if (fp) {
+ rc = (jint)((jint (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint, RECT *, jint, SIZE *))fp)(arg0, arg1, arg2, arg3, lparg4, arg5, lparg6);
+ }
+ }
+fail:
+ if (arg6 && lparg6) setSIZEFields(env, arg6, lparg6);
+ OS_NATIVE_EXIT(env, that, GetThemePartSize_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_GetThemeTextExtent
JNIEXPORT jint JNICALL OS_NATIVE(GetThemeTextExtent)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jcharArray arg4, jint arg5, jint arg6, jobject arg7, jobject arg8)

Back to the top