Mercurial > projects > dwt-linux
changeset 204:8ab2f71515ba
Fix: strange lines in CTabFolder, index bug because of evaluation order
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 08 Mar 2008 16:33:54 +0100 |
parents | 4085a50170ab |
children | 0fca38f4a7c0 |
files | dwt/custom/CTabFolder.d |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/custom/CTabFolder.d Sat Mar 08 16:32:38 2008 +0100 +++ b/dwt/custom/CTabFolder.d Sat Mar 08 16:33:54 2008 +0100 @@ -539,7 +539,7 @@ void antialias (int[] shape, RGB lineRGB, RGB innerRGB, RGB outerRGB, GC gc){ // Don't perform anti-aliasing on Mac and WPF because the platform // already does it. The simple style also does not require anti-aliasing. - if (simple || "carbon"==DWT.getPlatform() || "wpf"==DWT.getPlatform()) return; //$NON-NLS-1$ + if (simple || "carbon".equals(DWT.getPlatform()) || "wpf".equals(DWT.getPlatform())) return; //$NON-NLS-1$ // Don't perform anti-aliasing on low resolution displays if (getDisplay().getDepth() < 15) return; if (outerRGB !is null) { @@ -552,8 +552,10 @@ left = onBottom ? oldY <= shape[index+3] : oldY >= shape[index+3]; oldY = shape[index+1]; } - outer[index] = shape[index++] + (left ? -1 : +1); - outer[index] = shape[index++]; + outer[index] = shape[index] + (left ? -1 : +1); + index++; + outer[index] = shape[index]; + index++; } RGB from = lineRGB; RGB to = outerRGB; @@ -575,8 +577,10 @@ left = onBottom ? oldY <= shape[index+3] : oldY >= shape[index+3]; oldY = shape[index+1]; } - inner[index] = shape[index++] + (left ? +1 : -1); - inner[index] = shape[index++]; + inner[index] = shape[index] + (left ? +1 : -1); + index++; + inner[index] = shape[index]; + index++; } RGB from = lineRGB; RGB to = innerRGB; @@ -1316,7 +1320,7 @@ while ((index < length_) && (string[index] !is '&')) index++; if (++index >= length_) return string; if (string[index] !is '&') { - return string[0 .. index-1] ~ string[index .. length_]; + return string.substring(0, index-1) ~ string.substring(index, length_); } index++; } while (index < length_);