Mercurial > projects > dwt-addons
diff dwtx/jface/text/source/LineNumberRulerColumn.d @ 162:1a5b8f8129df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 00:51:37 +0200 |
parents | 7926b636c282 |
children | c3583c6ec027 |
line wrap: on
line diff
--- a/dwtx/jface/text/source/LineNumberRulerColumn.d Wed Aug 27 14:49:30 2008 +0200 +++ b/dwtx/jface/text/source/LineNumberRulerColumn.d Mon Sep 08 00:51:37 2008 +0200 @@ -583,7 +583,7 @@ int lines= document is null ? 0 : document.getNumberOfLines(); int digits= 2; - while (lines > Math.pow(10, digits) -1) { + while (lines > Math.pow(cast(real)10.0, cast(uint)digits) -1) { ++digits; } return digits; @@ -629,7 +629,7 @@ char[] nines= new char[fCachedNumberOfDigits]; Arrays.fill(nines, '9'); - String nineString= new String(nines); + String nineString= new_String(nines); Point p= gc.stringExtent(nineString); fIndentation[0]= p.x; @@ -653,6 +653,9 @@ fCachedTextWidget= fCachedTextViewer.getTextWidget(); fCanvas= new class(parentControl, DWT.NO_FOCUS ) Canvas { + this(Composite c, int s ){ + super(c,s); + } /* * @see dwt.widgets.Control#addMouseListener(dwt.events.MouseListener) * @since 3.4 @@ -877,7 +880,7 @@ int widgetLine= JFaceTextUtil.modelLineToWidgetLine(fCachedTextViewer, line); String s= createDisplayString(line); - int indentation= fIndentation[s.length()]; + int indentation= fIndentation[s.length]; int baselineBias= getBaselineBias(gc, widgetLine); gc.drawString(s, indentation, y + baselineBias, true); }