X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dadd4f5523e6ab9b489632f478958cd6dc8d03aa..74be3634b94f3febb0147cde99580e0344b8e74d:/src/richtext/richtextstylepage.cpp diff --git a/src/richtext/richtextstylepage.cpp b/src/richtext/richtextstylepage.cpp index 7951dc02af..19fbea008b 100644 --- a/src/richtext/richtextstylepage.cpp +++ b/src/richtext/richtextstylepage.cpp @@ -101,29 +101,29 @@ void wxRichTextStylePage::CreateControls() itemBoxSizer4->Add(itemBoxSizer5, 0, wxGROW, 5); wxStaticText* itemStaticText6 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Style:"), 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_styleName = new wxTextCtrl( itemPanel1, ID_RICHTEXTSTYLEPAGE_STYLE_NAME, _T(""), wxDefaultPosition, wxSize(300, -1), wxTE_READONLY ); + m_styleName = new wxTextCtrl( itemPanel1, ID_RICHTEXTSTYLEPAGE_STYLE_NAME, wxEmptyString, wxDefaultPosition, wxSize(300, -1), wxTE_READONLY ); m_styleName->SetHelpText(_("The style name.")); if (ShowToolTips()) m_styleName->SetToolTip(_("The style name.")); itemBoxSizer5->Add(m_styleName, 0, wxGROW|wxALL, 5); wxStaticText* itemStaticText8 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Based on:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer5->Add(itemStaticText8, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + itemBoxSizer5->Add(itemStaticText8, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxString* m_basedOnStrings = NULL; - m_basedOn = new wxComboBox( itemPanel1, ID_RICHTEXTSTYLEPAGE_BASED_ON, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_basedOnStrings, wxCB_DROPDOWN ); + m_basedOn = new wxComboBox( itemPanel1, ID_RICHTEXTSTYLEPAGE_BASED_ON, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, m_basedOnStrings, wxCB_DROPDOWN ); m_basedOn->SetHelpText(_("The style on which this style is based.")); if (ShowToolTips()) m_basedOn->SetToolTip(_("The style on which this style is based.")); itemBoxSizer5->Add(m_basedOn, 0, wxGROW|wxALL, 5); wxStaticText* itemStaticText10 = new wxStaticText( itemPanel1, wxID_STATIC, _("&Next style:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer5->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); + itemBoxSizer5->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxString* m_nextStyleStrings = NULL; - m_nextStyle = new wxComboBox( itemPanel1, ID_RICHTEXTSTYLEPAGE_NEXT_STYLE, _T(""), wxDefaultPosition, wxDefaultSize, 0, m_nextStyleStrings, wxCB_DROPDOWN ); + m_nextStyle = new wxComboBox( itemPanel1, ID_RICHTEXTSTYLEPAGE_NEXT_STYLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, m_nextStyleStrings, wxCB_DROPDOWN ); m_nextStyle->SetHelpText(_("The default style for the next paragraph.")); if (ShowToolTips()) m_nextStyle->SetToolTip(_("The default style for the next paragraph.")); @@ -145,7 +145,7 @@ bool wxRichTextStylePage::TransferDataFromWindow() wxRichTextParagraphStyleDefinition* paraDef = wxDynamicCast(def, wxRichTextParagraphStyleDefinition); if (paraDef) paraDef->SetNextStyle(m_nextStyle->GetValue()); - + def->SetName(m_styleName->GetValue()); def->SetBaseStyle(m_basedOn->GetValue()); } @@ -164,9 +164,9 @@ bool wxRichTextStylePage::TransferDataToWindow() wxRichTextListStyleDefinition* listDef = wxDynamicCast(def, wxRichTextListStyleDefinition); // wxRichTextCharacterStyleDefinition* charDef = wxDynamicCast(def, wxRichTextCharacterStyleDefinition); wxRichTextStyleSheet* sheet = wxRichTextFormattingDialog::GetDialog(this)->GetStyleSheet(); - + m_styleName->SetValue(def->GetName()); - + if (listDef) { if (m_nextStyle->GetCount() == 0) @@ -201,7 +201,7 @@ bool wxRichTextStylePage::TransferDataToWindow() } m_nextStyle->SetValue(paraDef->GetNextStyle()); } - + if (m_basedOn->GetCount() == 0) { if (sheet) @@ -238,14 +238,14 @@ bool wxRichTextStylePage::TransferDataToWindow() } } } - + m_basedOn->SetValue(def->GetBaseStyle()); } return true; } -wxTextAttrEx* wxRichTextStylePage::GetAttributes() +wxTextAttr* wxRichTextStylePage::GetAttributes() { return wxRichTextFormattingDialog::GetDialogAttributes(this); }