X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/36427ad571e504cc3e648f8ad100d86ee57d682a..cdb7bf66716a4f5c5d0e8b203e52826defdf5906:/src/richtext/richtextbulletspage.cpp diff --git a/src/richtext/richtextbulletspage.cpp b/src/richtext/richtextbulletspage.cpp index d7ba6a0ddf..1ba53c80a5 100644 --- a/src/richtext/richtextbulletspage.cpp +++ b/src/richtext/richtextbulletspage.cpp @@ -11,8 +11,9 @@ #if wxUSE_RICHTEXT +#include "wx/spinctrl.h" +#include "wx/utils.h" #include "wx/richtext/richtextbulletspage.h" - #include "wx/richtext/richtextsymboldlg.h" /*! @@ -156,7 +157,7 @@ void wxRichTextBulletsPage::CreateControls() itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); wxArrayString m_styleListBoxStrings; - m_styleListBox = new wxListBox( itemPanel1, ID_RICHTEXTBULLETSPAGE_STYLELISTBOX, wxDefaultPosition, wxSize(-1, 140), m_styleListBoxStrings, wxLB_SINGLE ); + m_styleListBox = new wxListBox( itemPanel1, ID_RICHTEXTBULLETSPAGE_STYLELISTBOX, wxDefaultPosition, wxSize(-1, 90), m_styleListBoxStrings, wxLB_SINGLE ); m_styleListBox->SetHelpText(_("The available bullet styles.")); if (wxRichTextBulletsPage::ShowToolTips()) m_styleListBox->SetToolTip(_("The available bullet styles.")); @@ -212,24 +213,24 @@ void wxRichTextBulletsPage::CreateControls() wxBoxSizer* itemBoxSizer18 = new wxBoxSizer(wxVERTICAL); itemBoxSizer4->Add(itemBoxSizer18, 0, wxGROW, 5); - wxStaticText* itemStaticText19 = new wxStaticText( itemPanel1, ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC, _("&Symbol:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer18->Add(itemStaticText19, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); + wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer18->Add(itemBoxSizer19, 0, wxGROW, 5); - wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer18->Add(itemBoxSizer20, 0, wxGROW, 5); + wxStaticText* itemStaticText20 = new wxStaticText( itemPanel1, ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC, _("&Symbol:"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer19->Add(itemStaticText20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); wxArrayString m_symbolCtrlStrings; m_symbolCtrl = new wxComboBox( itemPanel1, ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL, _T(""), wxDefaultPosition, wxSize(60, -1), m_symbolCtrlStrings, wxCB_DROPDOWN ); m_symbolCtrl->SetHelpText(_("The bullet character.")); if (wxRichTextBulletsPage::ShowToolTips()) m_symbolCtrl->SetToolTip(_("The bullet character.")); - itemBoxSizer20->Add(m_symbolCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxFIXED_MINSIZE, 5); + itemBoxSizer19->Add(m_symbolCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxFIXED_MINSIZE, 5); wxButton* itemButton22 = new wxButton( itemPanel1, ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL, _("Ch&oose..."), wxDefaultPosition, wxDefaultSize, 0 ); itemButton22->SetHelpText(_("Click to browse for a symbol.")); if (wxRichTextBulletsPage::ShowToolTips()) itemButton22->SetToolTip(_("Click to browse for a symbol.")); - itemBoxSizer20->Add(itemButton22, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer19->Add(itemButton22, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); itemBoxSizer18->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5); @@ -243,7 +244,7 @@ void wxRichTextBulletsPage::CreateControls() m_symbolFontCtrl->SetToolTip(_("Available fonts.")); itemBoxSizer18->Add(m_symbolFontCtrl, 0, wxGROW|wxALL, 5); - itemBoxSizer18->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + itemBoxSizer18->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL, 5); wxStaticText* itemStaticText27 = new wxStaticText( itemPanel1, ID_RICHTEXTBULLETSPAGE_NAMESTATIC, _("S&tandard bullet name:"), wxDefaultPosition, wxDefaultSize, 0 ); itemBoxSizer18->Add(itemStaticText27, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); @@ -255,7 +256,7 @@ void wxRichTextBulletsPage::CreateControls() m_bulletNameCtrl->SetToolTip(_("A standard bullet name.")); itemBoxSizer18->Add(m_bulletNameCtrl, 0, wxGROW|wxALL, 5); - itemBoxSizer18->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + itemBoxSizer18->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL, 5); wxStaticText* itemStaticText30 = new wxStaticText( itemPanel1, ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC, _("&Number:"), wxDefaultPosition, wxDefaultSize, 0 ); itemBoxSizer18->Add(itemStaticText30, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP, 5); @@ -266,16 +267,19 @@ void wxRichTextBulletsPage::CreateControls() m_numberCtrl->SetToolTip(_("The list item number.")); itemBoxSizer18->Add(m_numberCtrl, 0, wxGROW|wxALL, 5); - itemBoxSizer3->Add(5, 5, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL, 5); - m_previewCtrl = new wxRichTextCtrl( itemPanel1, ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL, wxEmptyString, wxDefaultPosition, wxSize(350, 180), wxSUNKEN_BORDER|wxVSCROLL|wxTE_READONLY ); + m_previewCtrl = new wxRichTextCtrl( itemPanel1, ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL, wxEmptyString, wxDefaultPosition, wxSize(350, 100), wxVSCROLL|wxTE_READONLY ); m_previewCtrl->SetHelpText(_("Shows a preview of the bullet settings.")); if (wxRichTextBulletsPage::ShowToolTips()) m_previewCtrl->SetToolTip(_("Shows a preview of the bullet settings.")); - itemBoxSizer3->Add(m_previewCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + itemBoxSizer3->Add(m_previewCtrl, 1, wxGROW|wxALL, 5); ////@end wxRichTextBulletsPage content construction + if (wxGetDisplaySize().y < 600) + m_previewCtrl->SetMinSize(wxSize(350, 50)); + m_styleListBox->Append(_("(None)")); m_styleListBox->Append(_("Arabic")); m_styleListBox->Append(_("Upper case letters")); @@ -477,12 +481,12 @@ bool wxRichTextBulletsPage::TransferDataToWindow() void wxRichTextBulletsPage::UpdatePreview() { static const wxChar* s_para1 = wxT("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \ -Nullam ante sapien, vestibulum nonummy, pulvinar sed, luctus ut, lacus."); +Nullam ante sapien, vestibulum nonummy, pulvinar sed, luctus ut, lacus.\n"); - static const wxChar* s_para2 = wxT("\nDuis pharetra consequat dui. Cum sociis natoque penatibus \ -et magnis dis parturient montes, nascetur ridiculus mus. Nullam vitae justo id mauris lobortis interdum."); + static const wxChar* s_para2 = wxT("Duis pharetra consequat dui. Cum sociis natoque penatibus \ +et magnis dis parturient montes, nascetur ridiculus mus. Nullam vitae justo id mauris lobortis interdum.\n"); - static const wxChar* s_para3 = wxT("\nInteger convallis dolor at augue \ + static const wxChar* s_para3 = wxT("Integer convallis dolor at augue \ iaculis malesuada. Donec bibendum ipsum ut ante porta fringilla.\n"); TransferDataFromWindow();