From 53a58063726886ace8d95d352fa82251153003de Mon Sep 17 00:00:00 2001 From: Daniel Kulp Date: Mon, 22 Feb 2016 22:51:59 +0100 Subject: [PATCH] Create strike-through wxGraphicsFont objects in wxOSX Honour wxFONTFLAG_UNDERLINED in wxGraphicsFont::CreateFont() overload taking flags. See https://github.com/wxWidgets/wxWidgets/pull/187 --- docs/changes.txt | 2 +- src/osx/carbon/graphics.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index e239719dd4..839e30343c 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -223,7 +223,7 @@ wxOSX/Cocoa: - Fix wxEVT_CHAR for non-BMP Unicode characters (ARATA Mizuki). - Add wxTE_AUTO_URL support to wxTextCtrl (Igor Korot). - Add support for wxEVT_COMBOBOX_{DROPDOWN, CLOSEUP} events (Igor Korot). -- Implement strike-through support in wxFont (Igor Korot). +- Implement strike-through support in wxFont (Igor Korot, Daniel Kulp). - Provide native implementation of wxStandardPaths (Tobias Taschner). - Add wxTE_{RIGHT,CENTER} support for multiline wxTextCtrl (Andreas Falkenhahn). - Don't leave wxSlider labels shown when the slider itself is hidden. diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 15d1818e85..091c2c271b 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -2875,6 +2875,9 @@ wxMacCoreGraphicsRenderer::CreateFont(double sizeInPixels, (flags & wxFONTFLAG_UNDERLINED) != 0, facename); + if ( flags & wxFONTFLAG_STRIKETHROUGH ) + font.MakeStrikethrough(); + wxGraphicsFont f; f.SetRefData(new wxMacCoreGraphicsFontData(this, font, col)); return f;