diff options
author | Felipe Heidrich <fheidric> | 2007-11-05 19:31:49 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2007-11-05 19:31:49 +0000 |
commit | 9b9c6b0910641c7e87f17fe68103eefcd763b4ad (patch) | |
tree | 6486ef30f94db4fc4a2ea4e7e92631f97bd68930 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java | |
parent | 328f0dfaef9e58eafb39db3715d46ca35b36d909 (diff) | |
download | eclipse.platform.swt-9b9c6b0910641c7e87f17fe68103eefcd763b4ad.tar.gz eclipse.platform.swt-9b9c6b0910641c7e87f17fe68103eefcd763b4ad.tar.xz eclipse.platform.swt-9b9c6b0910641c7e87f17fe68103eefcd763b4ad.zip |
Bug 205794 Provide SWT.UNDERLINE_SQUIGGLE text style
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java index 82519925c7..6e684384c2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java @@ -189,6 +189,7 @@ void computeRuns () { case SWT.UNDERLINE_DOUBLE: underlineStyle = OS.PANGO_UNDERLINE_DOUBLE; break; + case SWT.UNDERLINE_SQUIGGLE: case SWT.UNDERLINE_ERROR: if (OS.GTK_VERSION >= OS.VERSION(2, 4, 0)) { underlineStyle = OS.PANGO_UNDERLINE_ERROR; @@ -647,7 +648,7 @@ void drawBorder(GC gc, int x, int y, GdkColor selectionColor) { boolean drawUnderline = false; if (style.underline && style.underlineColor != null) drawUnderline = true; - if (style.underline && style.underlineStyle == SWT.UNDERLINE_ERROR && OS.GTK_VERSION < OS.VERSION(2, 4, 0)) drawUnderline = true; + if (style.underline && (style.underlineStyle == SWT.UNDERLINE_ERROR || style.underlineStyle == SWT.UNDERLINE_SQUIGGLE)&& OS.GTK_VERSION < OS.VERSION(2, 4, 0)) drawUnderline = true; if (drawUnderline && !style.isAdherentUnderline(styles[i+1].style)) { int start = styles[i].start; for (int j = i; j > 0 && style.isAdherentUnderline(styles[j-1].style); j--) { @@ -697,6 +698,7 @@ void drawBorder(GC gc, int x, int y, GdkColor selectionColor) { FontMetrics metrics = getLineMetrics(lineIndex); int underlineY = rect.y + metrics.ascent - underlinePosition - style.rise; switch (style.underlineStyle) { + case SWT.UNDERLINE_SQUIGGLE: case SWT.UNDERLINE_ERROR: { int squigglyThickness = underlineThickness; int squigglyHeight = 2 * squigglyThickness; |