]> git.saurik.com Git - wxWidgets.git/commitdiff
Take into account wxFONTFLAG_STRIKETHROUGH in wxGTK wxFont ctor.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 15 Sep 2012 23:16:46 +0000 (23:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 15 Sep 2012 23:16:46 +0000 (23:16 +0000)
Honour wxFONTFLAG_STRIKETHROUGH in wxFont ctor taking flags as this is the
only way to create a strike-through font currently.

See #14559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/font.h
src/gtk/font.cpp

index 27f42bbca8588a81560a421699d1ade932f91657..b14281221e0ffcb638a3a0dddb658715a3bde063 100644 (file)
@@ -318,6 +318,10 @@ protected:
         return (flags & wxFONTFLAG_UNDERLINED) != 0;
     }
 
+    static bool GetStrikethroughFromFlags(int flags)
+    {
+        return (flags & wxFONTFLAG_STRIKETHROUGH) != 0;
+    }
 
 private:
     // the currently default encoding: by default, it's the default system
index 06260392d949c295a61add4d87196cb63787a5f9..5ff6a3a10f2c677fa0c81e316cff36819665c92d 100644 (file)
@@ -299,7 +299,8 @@ wxFont::wxFont(int pointSize,
                                   GetStyleFromFlags(flags),
                                   GetWeightFromFlags(flags),
                                   GetUnderlinedFromFlags(flags),
-                                  false, face, encoding);
+                                  GetStrikethroughFromFlags(flags),
+                                  face, encoding);
 }
 
 bool wxFont::Create( int pointSize,