Accept "default" as font family value in XRC.
Map it to wxFONTFAMILY_DEFAULT, just as we do for all other wxFontFamily enum elements. Closes #16549. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -592,6 +592,7 @@ All (GUI):
|
|||||||
- Add XRC handler for wxSimplebook.
|
- Add XRC handler for wxSimplebook.
|
||||||
- Return correct value from wxCommandEvent::GetString() for programmatically
|
- Return correct value from wxCommandEvent::GetString() for programmatically
|
||||||
generated wxEVT_TEXT events from wxComboBox.
|
generated wxEVT_TEXT events from wxComboBox.
|
||||||
|
- Accept "default" as font family value in XRC (pieleric).
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -401,8 +401,8 @@ and can be one of the following "sub-properties":
|
|||||||
@row3col{weight, enum,
|
@row3col{weight, enum,
|
||||||
One of "normal", "bold" or "light" (default: normal).}
|
One of "normal", "bold" or "light" (default: normal).}
|
||||||
@row3col{family, enum,
|
@row3col{family, enum,
|
||||||
One of "roman", "script", "decorative", "swiss", "modern" or "teletype"
|
One of "default", "roman", "script", "decorative", "swiss", "modern" or "teletype"
|
||||||
(default: roman).}
|
(default: default).}
|
||||||
@row3col{underlined, @ref overview_xrcformat_type_bool,
|
@row3col{underlined, @ref overview_xrcformat_type_bool,
|
||||||
Whether the font should be underlined (default: 0).}
|
Whether the font should be underlined (default: 0).}
|
||||||
@row3col{face, ,
|
@row3col{face, ,
|
||||||
|
@@ -2268,7 +2268,8 @@ wxFont wxXmlResourceHandlerImpl::GetFont(const wxString& param, wxWindow* parent
|
|||||||
if (hasFamily)
|
if (hasFamily)
|
||||||
{
|
{
|
||||||
wxString family = GetParamValue(wxT("family"));
|
wxString family = GetParamValue(wxT("family"));
|
||||||
if (family == wxT("decorative")) ifamily = wxDECORATIVE;
|
if (family == wxT("default")) ifamily = wxFONTFAMILY_DEFAULT;
|
||||||
|
else if (family == wxT("decorative")) ifamily = wxDECORATIVE;
|
||||||
else if (family == wxT("roman")) ifamily = wxROMAN;
|
else if (family == wxT("roman")) ifamily = wxROMAN;
|
||||||
else if (family == wxT("script")) ifamily = wxSCRIPT;
|
else if (family == wxT("script")) ifamily = wxSCRIPT;
|
||||||
else if (family == wxT("swiss")) ifamily = wxSWISS;
|
else if (family == wxT("swiss")) ifamily = wxSWISS;
|
||||||
|
Reference in New Issue
Block a user