From 42fe8f889ed9ab22c287b2b2fbf20434a5129be7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 14 Jun 2016 21:43:38 +0200 Subject: [PATCH] Return more attributes from wxGTK wxTextCtrl::GetStyle() Set "underlined" and "strikethrough" style attributes to correspond to the ones really used too. See #17523. --- src/gtk/textctrl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 07082f9b48..772bb94c20 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1789,6 +1789,11 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style) if ( font.SetNativeFontInfo(wxString(pangoFontString)) ) style.SetFont(font); + if ( pattr->appearance.underline != PANGO_UNDERLINE_NONE ) + style.SetFontUnderlined(true); + if ( pattr->appearance.strikethrough ) + style.SetFontStrikethrough(true); + // TODO: set alignment, tabs and indents }