From d180df5c431d4dc9e788141794fd51fe1f39ad3e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 2 Dec 2012 23:49:48 +0000 Subject: [PATCH] Allow specifying -1 as font size to mean "default" in wxMSW. This has never been officially documented but used to work in 2.8 and still works in wxGTK, so make it works in wxMSW too for consistency. Closes #12541. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/font.cpp b/src/msw/font.cpp index b0e73148cb..060139df72 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -841,7 +841,7 @@ bool wxFont::DoCreate(int pointSize, // wxDEFAULT is a valid value for the font size too so we must treat it // specially here (otherwise the size would be 70 == wxDEFAULT value) - if ( pointSize == wxDEFAULT ) + if ( pointSize == wxDEFAULT || pointSize == -1 ) { pointSize = wxNORMAL_FONT->GetPointSize(); } -- 2.50.0