X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMPackageManagerPanel.cpp;h=a888f8bcce35c53106f6217a5d94a1df48a51f97;hb=752294dd30e2ee94f38be513d441f4716509ce13;hp=d11472750999a7ff63e607d8444a2f6438c67fed;hpb=82535c727c13786bc29fc0f0e73aca927d77b8fe;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp b/lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp index d114727..a888f8b 100644 --- a/lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp @@ -93,11 +93,18 @@ void wxCDMPackageManagerPanel::CreateControls() returnbt->SetToolTip(wxT("Return to the active project description.")); sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5); - //Title - sizer->Add(new wxStaticText(this, -1, _("Package Management")),0, wxALIGN_CENTER, 0); - - //Image - sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PkIcon64)),0, wxALIGN_CENTER, 0); + //Header + wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL); + { + //Image + headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PkIcon64)),0, wxALIGN_CENTER, 0); + wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL); + //Title + textSizer->Add(new wxStaticText(this, -1, _("Package Management")),0, wxALIGN_LEFT, 0); + + headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); + } + sizer->Add(headerSizer, 0, wxALIGN_CENTER); //Packages wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("A&vailable Packages")); @@ -109,16 +116,17 @@ void wxCDMPackageManagerPanel::CreateControls() for (int i = 0; i < packages.size(); i++) { wxHyperlinkCtrl* pPackagelk = new wxHyperlinkCtrl(propertiesPanel,ID_LINK_SELECT_PACKAGE, crea::std2wx(packages[i]->GetName().c_str()), crea::std2wx(packages[i]->GetName().c_str())); + pPackagelk->SetWindowStyle(wxALIGN_LEFT); std::string tt = "Author: " + packages[i]->GetAuthors() + "\nDescription: " + packages[i]->GetDescription(); pPackagelk->SetToolTip(crea::std2wx(tt)); - propertiesPanelSizer -> Add(pPackagelk, 0, wxALIGN_LEFT | wxALL, 5); + propertiesPanelSizer -> Add(pPackagelk, 0, wxEXPAND | wxALL, 5); pPackagelk->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerPanel::OnMouseEnter,NULL,this); pPackagelk->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerPanel::OnMouseExit,NULL,this); } propertiesPanel->SetSizer(propertiesPanelSizer); propertiesPanelSizer->Fit(propertiesPanel); - propertiesBox->Add(propertiesPanel, 0, wxALL, 5); + propertiesBox->Add(propertiesPanel, 1, wxALL | wxEXPAND, 5); sizer -> Add(propertiesBox, 0, wxEXPAND | wxALL, 10); @@ -127,18 +135,25 @@ void wxCDMPackageManagerPanel::CreateControls() wxPanel* actionsPanel = new wxPanel(this); wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL); - wxButton* createPkgbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_PACKAGE, _T("Create Package")); + //actionsGrid Sizer + wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(1, 2, 9, 15); + + wxButton* createPkgbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_PACKAGE, _T("A. Create Package")); createPkgbt->SetToolTip(wxT("Create a new package for this project.")); - actionsPanelSizer->Add(createPkgbt, 0, wxALL, 5); - wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File")); + actionsGridSizer->Add(createPkgbt, 1, wxALL | wxEXPAND, 5); + wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File")); editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt file of this project.")); editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerPanel::OnCMakeMouseEnter,NULL,this); editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageManagerPanel::OnCMakeMouseExit,NULL,this); - actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5); + actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5); + + actionsGridSizer->AddGrowableCol(0,1); + actionsGridSizer->AddGrowableCol(1,1); + actionsPanelSizer->Add(actionsGridSizer, 1, wxEXPAND, 0); actionsPanel->SetSizer(actionsPanelSizer); actionsPanelSizer->Fit(actionsPanel); - actionsBox->Add(actionsPanel, 0, wxEXPAND); + actionsBox->Add(actionsPanel, 1, wxEXPAND); sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10); //Assign sizer