summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
diff options
context:
space:
mode:
authorSteve Northover <steve>2005-11-07 17:49:37 +0000
committerSteve Northover <steve>2005-11-07 17:49:37 +0000
commit24faac006c00d23af4206eae21842f94ea185145 (patch)
tree213bccfc7e57c7362a140fa3544ec66eb8dc0436 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
parent93775a1fbc788cf9a4bee043883199be184003c2 (diff)
downloadeclipse.platform.swt-24faac006c00d23af4206eae21842f94ea185145.tar.gz
eclipse.platform.swt-24faac006c00d23af4206eae21842f94ea185145.tar.xz
eclipse.platform.swt-24faac006c00d23af4206eae21842f94ea185145.zip
115229 - SWT.RIGHT on Label with Image causes drawing problems
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
index 5fda848f86..4d41620591 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
@@ -435,7 +435,15 @@ LRESULT WM_SIZE (int wParam, int lParam) {
if ((style & SWT.SEPARATOR) != 0) {
OS.InvalidateRect (handle, null, true);
return result;
- }
+ }
+ int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
+ if ((bits & OS.SS_OWNERDRAW) == OS.SS_OWNERDRAW) {
+ if ((style & SWT.LEFT) != 0 && (style & SWT.WRAP) == 0) {
+ return result;
+ }
+ OS.InvalidateRect (handle, null, true);
+ return result;
+ }
/*
* Bug in Windows. For some reason, a label with
* style SS_LEFT, SS_CENTER or SS_RIGHT does not
@@ -443,8 +451,7 @@ LRESULT WM_SIZE (int wParam, int lParam) {
* Note that SS_LEFTNOWORDWRAP does not have the
* problem. The fix is to force the redraw.
*/
- int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- if ((bits & OS.SS_LEFTNOWORDWRAP) == 0) {
+ if ((bits & OS.SS_LEFTNOWORDWRAP) != OS.SS_LEFTNOWORDWRAP) {
OS.InvalidateRect (handle, null, true);
return result;
}