X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d1e5be0ec67336ae78da743ad92216b3108365b6..47009083ce5da26c6125fae8947e0615b202a81b:/src/richtext/richtextfontpage.cpp?ds=inline diff --git a/src/richtext/richtextfontpage.cpp b/src/richtext/richtextfontpage.cpp index 3105bddeb0..87a3fb7830 100644 --- a/src/richtext/richtextfontpage.cpp +++ b/src/richtext/richtextfontpage.cpp @@ -314,11 +314,11 @@ bool wxRichTextFontPage::TransferDataFromWindow() if (m_styleCtrl->GetSelection() != wxNOT_FOUND) { - int style; + wxFontStyle style; if (m_styleCtrl->GetStringSelection() == _("Italic")) - style = wxITALIC; + style = wxFONTSTYLE_ITALIC; else - style = wxNORMAL; + style = wxFONTSTYLE_NORMAL; attr->SetFontStyle(style); } @@ -327,11 +327,11 @@ bool wxRichTextFontPage::TransferDataFromWindow() if (m_weightCtrl->GetSelection() != wxNOT_FOUND) { - int weight; + wxFontWeight weight; if (m_weightCtrl->GetStringSelection() == _("Bold")) - weight = wxBOLD; + weight = wxFONTWEIGHT_BOLD; else - weight = wxNORMAL; + weight = wxFONTWEIGHT_NORMAL; attr->SetFontWeight(weight); } @@ -793,8 +793,6 @@ void wxRichTextFontPage::OnRichtextfontpageSuperscriptClick( wxCommandEvent& WXU { if ( m_superscriptCtrl->Get3StateValue() == wxCHK_CHECKED) m_subscriptCtrl->Set3StateValue( wxCHK_UNCHECKED ); - else - m_subscriptCtrl->Set3StateValue( wxCHK_CHECKED ); UpdatePreview(); } @@ -807,8 +805,6 @@ void wxRichTextFontPage::OnRichtextfontpageSubscriptClick( wxCommandEvent& WXUNU { if ( m_subscriptCtrl->Get3StateValue() == wxCHK_CHECKED) m_superscriptCtrl->Set3StateValue( wxCHK_UNCHECKED ); - else - m_superscriptCtrl->Set3StateValue( wxCHK_CHECKED ); UpdatePreview(); }