Mercurial > projects > dwt-mac
diff dwt/graphics/TextLayout.d @ 154:535243e6d16a
Fixes to make dwt compile with ldc
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 13 Jun 2009 00:25:05 +0200 |
parents | 0ba75290f8ce |
children | e91dcbf77cc7 |
line wrap: on
line diff
--- a/dwt/graphics/TextLayout.d Thu Jun 11 01:36:32 2009 +0200 +++ b/dwt/graphics/TextLayout.d Sat Jun 13 00:25:05 2009 +0200 @@ -411,14 +411,15 @@ pt.x = x; pt.y = y; bool hasSelection = selectionStart <= selectionEnd && selectionStart !is -1 && selectionEnd !is -1; - NSRange* selectionRange = null; + NSRange* selectionRange = null; NSColor selectionColor = null; if (hasSelection || (flags & DWT.LAST_LINE_SELECTION) !is 0) { if (selectionBackground is null) selectionBackground = device.getSystemColor(DWT.COLOR_LIST_SELECTION); selectionColor = NSColor.colorWithDeviceRed(selectionBackground.handle[0], selectionBackground.handle[1], selectionBackground.handle[2], selectionBackground.handle[3]); } if (hasSelection) { - selectionRange = &NSRange(); + NSRange range; + selectionRange = ⦥ selectionRange.location = selectionStart; selectionRange.length = selectionEnd - selectionStart + 1; layoutManager.addTemporaryAttribute(OS.NSBackgroundColorAttributeName, selectionColor, *selectionRange);