]> git.saurik.com Git - wxWidgets.git/commitdiff
support underlined fonts (patch 1448089)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Mar 2006 14:14:59 +0000 (14:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Mar 2006 14:14:59 +0000 (14:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/gtk/textctrl.cpp

index d071bab7c159ff6d32292e497c83402283877794..a89fa51c0086caf596ecbe8954c7362c5791f5cb 100644 (file)
@@ -157,6 +157,7 @@ wxGTK:
 - Polygon and line drawing speeded up if there is no scaling.
 - Fixed problems with CJK input method.
 - Implemented ScrollLines/Pages() for all windows (Paul Cornett)
 - Polygon and line drawing speeded up if there is no scaling.
 - Fixed problems with CJK input method.
 - Implemented ScrollLines/Pages() for all windows (Paul Cornett)
+- Support underlined fonts in wxTextCtrl
 
 wxMac:
 
 
 wxMac:
 
index 5e852cc3a6695d0188b226111acafe95667790c8..373b2536b748ddfdadbbdb67b8efe1608b7b04d3 100644 (file)
@@ -85,6 +85,19 @@ static void wxGtkTextApplyTagsFromAttr(GtkTextBuffer *text_buffer,
                                               NULL );
         gtk_text_buffer_apply_tag (text_buffer, tag, start, end);
         g_free (font_string);
                                               NULL );
         gtk_text_buffer_apply_tag (text_buffer, tag, start, end);
         g_free (font_string);
+
+        if (attr.GetFont().GetUnderlined())
+        {
+            g_snprintf(buf, sizeof(buf), "WXFONTUNDERLINE");
+            tag = gtk_text_tag_table_lookup( gtk_text_buffer_get_tag_table( text_buffer ),
+                                             buf );
+            if (!tag)
+                tag = gtk_text_buffer_create_tag( text_buffer, buf,
+                                                  "underline-set", TRUE,
+                                                  "underline", PANGO_UNDERLINE_SINGLE,
+                                                  NULL );
+            gtk_text_buffer_apply_tag (text_buffer, tag, start, end);
+        }
     }
 
     if (attr.HasTextColour())
     }
 
     if (attr.HasTextColour())