Add wxFont::GetBaseFont().
This can be used to "undo" the result of Bold() ,Underlined() or Italic() methods and returns an unadorned version of the font. Closes #11815. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -202,6 +202,13 @@ void FontTestCase::GetSet()
|
||||
CPPUNIT_ASSERT( test.IsOk() );
|
||||
CPPUNIT_ASSERT_EQUAL( true, test.GetUnderlined() );
|
||||
|
||||
const wxFont fontBase = test.GetBaseFont();
|
||||
CPPUNIT_ASSERT( fontBase.IsOk() );
|
||||
CPPUNIT_ASSERT( !fontBase.GetUnderlined() );
|
||||
CPPUNIT_ASSERT( !fontBase.GetStrikethrough() );
|
||||
CPPUNIT_ASSERT_EQUAL( wxFONTWEIGHT_NORMAL, fontBase.GetWeight() );
|
||||
CPPUNIT_ASSERT_EQUAL( wxFONTSTYLE_NORMAL, fontBase.GetStyle() );
|
||||
|
||||
// test Get/SetStrikethrough()
|
||||
|
||||
// Strike through support not implemented in wxOSX currently.
|
||||
|
Reference in New Issue
Block a user