X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f71a77057d49f4fbf727ad3a5ad2269d124ed0d..1f65137f8de90aba96242d5e44b00dfd0efa4b67:/src/richtext/richtextformatdlg.cpp diff --git a/src/richtext/richtextformatdlg.cpp b/src/richtext/richtextformatdlg.cpp index 7c21d4c062..018bbb7760 100644 --- a/src/richtext/richtextformatdlg.cpp +++ b/src/richtext/richtextformatdlg.cpp @@ -408,6 +408,8 @@ void wxRichTextFontPreviewCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) long w = 0, h = 0; wxString text(_("ABCDEFGabcdefg12345")); + if (GetTextEffects() & wxTEXT_ATTR_EFFECT_CAPITALS) + text.MakeUpper(); dc.GetTextExtent( text, &w, &h); int cx = wxMax(2, (size.x/2) - (w/2)); @@ -416,6 +418,13 @@ void wxRichTextFontPreviewCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) dc.SetTextForeground(GetForegroundColour()); dc.SetClippingRegion(2, 2, size.x-4, size.y-4); dc.DrawText(text, cx, cy); + + if (GetTextEffects() & wxTEXT_ATTR_EFFECT_STRIKETHROUGH) + { + dc.SetPen(wxPen(GetForegroundColour(), 1)); + dc.DrawLine(cx, (int) (cy + h/2 + 0.5), cx + w, (int) (cy + h/2 + 0.5)); + } + dc.DestroyClippingRegion(); } }