X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42688aea2d1703c2942e281658ca8183f728f8fa..5bf3f27fc91ff3288000c0134ac4bdfdf2e7db4f:/src/richtext/richtextfontpage.cpp diff --git a/src/richtext/richtextfontpage.cpp b/src/richtext/richtextfontpage.cpp index a445486597..1324dab7f1 100644 --- a/src/richtext/richtextfontpage.cpp +++ b/src/richtext/richtextfontpage.cpp @@ -126,7 +126,7 @@ void wxRichTextFontPage::CreateControls() itemBoxSizer4->Add(itemBoxSizer5, 1, wxGROW, 5); wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Font:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); m_faceTextCtrl = new wxTextCtrl( itemPanel1, ID_RICHTEXTFONTPAGE_FACETEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); m_faceTextCtrl->SetHelpText(_("Type a font name.")); @@ -144,7 +144,7 @@ void wxRichTextFontPage::CreateControls() itemBoxSizer4->Add(itemBoxSizer9, 0, wxGROW, 5); wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Size:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer9->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + itemBoxSizer9->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); m_sizeTextCtrl = new wxTextCtrl( itemPanel1, ID_RICHTEXTFONTPAGE_SIZETEXTCTRL, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); m_sizeTextCtrl->SetHelpText(_("Type a size in points.")); @@ -166,7 +166,7 @@ void wxRichTextFontPage::CreateControls() itemBoxSizer13->Add(itemBoxSizer14, 1, wxGROW, 5); wxStaticText* itemStaticText15 = new wxStaticText( itemPanel1, wxID_STATIC, _("Font st&yle:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer14->Add(itemStaticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + itemBoxSizer14->Add(itemStaticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxString* m_styleCtrlStrings = NULL; m_styleCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTFONTPAGE_STYLECTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_styleCtrlStrings, wxCB_READONLY ); @@ -179,7 +179,7 @@ void wxRichTextFontPage::CreateControls() itemBoxSizer13->Add(itemBoxSizer17, 1, wxGROW, 5); wxStaticText* itemStaticText18 = new wxStaticText( itemPanel1, wxID_STATIC, _("Font &weight:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer17->Add(itemStaticText18, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + itemBoxSizer17->Add(itemStaticText18, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxString* m_weightCtrlStrings = NULL; m_weightCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTFONTPAGE_WEIGHTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_weightCtrlStrings, wxCB_READONLY ); @@ -192,7 +192,7 @@ void wxRichTextFontPage::CreateControls() itemBoxSizer13->Add(itemBoxSizer20, 1, wxGROW, 5); wxStaticText* itemStaticText21 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Underlining:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer20->Add(itemStaticText21, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + itemBoxSizer20->Add(itemStaticText21, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxString* m_underliningCtrlStrings = NULL; m_underliningCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_underliningCtrlStrings, wxCB_READONLY ); @@ -205,7 +205,7 @@ void wxRichTextFontPage::CreateControls() itemBoxSizer13->Add(itemBoxSizer23, 0, wxGROW, 5); wxStaticText* itemStaticText24 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Colour:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer23->Add(itemStaticText24, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + itemBoxSizer23->Add(itemStaticText24, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); m_colourCtrl = new wxRichTextColourSwatchCtrl( itemPanel1, ID_RICHTEXTFONTPAGE_COLOURCTRL, wxDefaultPosition, wxSize(40, 20), wxSIMPLE_BORDER ); m_colourCtrl->SetHelpText(_("Click to change the text colour.")); @@ -383,7 +383,7 @@ bool wxRichTextFontPage::TransferDataToWindow() m_dontUpdate = true; wxTextAttrEx* attr = GetAttributes(); - if (attr->HasFont() && attr->HasFaceName()) + if (attr->HasFont() && attr->HasFontFaceName()) { m_faceTextCtrl->SetValue(attr->GetFont().GetFaceName()); m_faceListBox->SetFaceNameSelection(attr->GetFont().GetFaceName()); @@ -394,7 +394,7 @@ bool wxRichTextFontPage::TransferDataToWindow() m_faceListBox->SetFaceNameSelection(wxEmptyString); } - if (attr->HasFont() && attr->HasSize()) + if (attr->HasFont() && attr->HasFontSize()) { wxString strSize = wxString::Format(wxT("%d"), attr->GetFont().GetPointSize()); m_sizeTextCtrl->SetValue(strSize); @@ -407,7 +407,7 @@ bool wxRichTextFontPage::TransferDataToWindow() m_sizeListBox->SetSelection(wxNOT_FOUND); } - if (attr->HasFont() && attr->HasWeight()) + if (attr->HasFont() && attr->HasFontWeight()) { if (attr->GetFont().GetWeight() == wxBOLD) m_weightCtrl->SetSelection(1); @@ -419,7 +419,7 @@ bool wxRichTextFontPage::TransferDataToWindow() m_weightCtrl->SetSelection(wxNOT_FOUND); } - if (attr->HasFont() && attr->HasItalic()) + if (attr->HasFont() && attr->HasFontItalic()) { if (attr->GetFont().GetStyle() == wxITALIC) m_styleCtrl->SetSelection(1); @@ -431,7 +431,7 @@ bool wxRichTextFontPage::TransferDataToWindow() m_styleCtrl->SetSelection(wxNOT_FOUND); } - if (attr->HasFont() && attr->HasUnderlined()) + if (attr->HasFont() && attr->HasFontUnderlined()) { if (attr->GetFont().GetUnderlined()) m_underliningCtrl->SetSelection(1); @@ -622,7 +622,7 @@ void wxRichTextFontPage::OnFaceTextCtrlUpdated( wxCommandEvent& WXUNUSED(event) { if (arr[i].Mid(0, facename.Length()).Lower() == facename.Lower()) { - m_faceListBox->ScrollToLine(i); + m_faceListBox->ScrollToRow(i); break; } }