From ebb94307931943790cf736dcba0e7466bc0c1ace Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Wed, 12 Feb 2014 21:47:52 +0000 Subject: [PATCH] Description text now resizes with confirmation window. --- src/gui/editor.cpp | 7 +++++++ src/gui/editor.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/gui/editor.cpp b/src/gui/editor.cpp index e66a8c9e..296a2f59 100644 --- a/src/gui/editor.cpp +++ b/src/gui/editor.cpp @@ -192,6 +192,7 @@ MiniEditor::MiniEditor(wxWindow *parent, const wxString& title, const std::list< Bind(wxEVT_BUTTON, &MiniEditor::OnRemoveRow, this, BUTTON_RemoveRow); Bind(wxEVT_CHECKBOX, &MiniEditor::OnFilterToggle, this); Bind(wxEVT_BUTTON, &MiniEditor::OnApply, this, wxID_APPLY); + Bind(wxEVT_SIZE, &MiniEditor::OnResize, this); //Set up editing panel layout. wxBoxSizer * mainBox = new wxBoxSizer(wxVERTICAL); @@ -446,6 +447,12 @@ boss::Plugin MiniEditor::GetNewData(const wxString& plugin) const { return edited; } +void MiniEditor::OnResize(wxSizeEvent& event) { + descText->SetLabel(translate("Please submit any edits made for reasons other than personal preference to the BOSS team so that they may be included in the masterlist.")); + descText->Wrap(GetClientSize().GetWidth()-30); + event.Skip(); +} + /////////////////////////////////// // Editor Class /////////////////////////////////// diff --git a/src/gui/editor.h b/src/gui/editor.h index 71fb1bf8..869095a6 100644 --- a/src/gui/editor.h +++ b/src/gui/editor.h @@ -90,6 +90,7 @@ public: void OnFilterToggle(wxCommandEvent& event); void OnDragStart(wxListEvent& event); void OnApply(wxCommandEvent& event); + void OnResize(wxSizeEvent& event); const std::list& GetEditedPlugins() const; private: