]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / wxCDMPackageManagerPanel.cpp
index d11472750999a7ff63e607d8444a2f6438c67fed..3cd317bd7c65556430fcb5f9d3c63cdff2e06e97 100644 (file)
@@ -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"));
@@ -127,18 +134,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