]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextfontpage.cpp
a few more member groups, in line with the real header's groups
[wxWidgets.git] / src / richtext / richtextfontpage.cpp
index 3105bddeb0d46c635365c799ef99d5159bfe8ac5..87a3fb7830cac8839c841e051db099f876d955f3 100644 (file)
@@ -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();
 }