# HG changeset patch # User Frank Benoit # Date 1204495245 -3600 # Node ID cd8dc3f1967907f12463efc59e7e3b1f24128924 # Parent 1fa3c8d8848618310feb07f34f89f7d715e4de55 Fix: missing styles in StyleRange diff -r 1fa3c8d88486 -r cd8dc3f19679 dwt/custom/StyleRange.d --- a/dwt/custom/StyleRange.d Sun Mar 02 22:02:57 2008 +0100 +++ b/dwt/custom/StyleRange.d Sun Mar 02 23:00:45 2008 +0100 @@ -45,6 +45,16 @@ */ public int fontStyle = DWT.NORMAL; +/++ + + DWT extension for clone implementation + +/ +protected this( StyleRange other ){ + super( other ); + start = other.start; + length = other.length; + fontStyle = other.fontStyle; +} + /** * Create a new style range with no styles * @@ -156,7 +166,7 @@ * @return a shallow copy of this StyleRange */ public /+override+/ Object clone() { - return new StyleRange( start, length, foreground, background, fontStyle ); + return new StyleRange( this ); } /** diff -r 1fa3c8d88486 -r cd8dc3f19679 dwt/graphics/TextStyle.d --- a/dwt/graphics/TextStyle.d Sun Mar 02 22:02:57 2008 +0100 +++ b/dwt/graphics/TextStyle.d Sun Mar 02 23:00:45 2008 +0100 @@ -84,6 +84,19 @@ */ public int rise; +/++ + + DWT extension for clone implementation + +/ +protected this( TextStyle other ){ + font = other.font; + foreground = other.foreground; + background = other.background; + underline = other.underline; + strikeout = other.strikeout; + metrics = other.metrics; + rise = other.rise; +} + /** * Create a new text style with the specified font, foreground * and background.