]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / wxCDMAppliDescriptionPanel.cpp
index 9fb749ddfe6ac0002777c1ae6d5fec99c7afaa78..e99bc1334d0d233530c5465ef17b20ab088c87d5 100644 (file)
@@ -92,12 +92,18 @@ void wxCDMAppliDescriptionPanel::CreateControls()
   wxButton* returnbt = new wxButton(this, ID_BUTTON_PREV, wxT("Return to project"));
   returnbt->SetToolTip(wxT("Return to the active project description."));
   sizer->Add(returnbt, 0, wxALIGN_CENTER | wxALL, 5);
-
-  //Title
-  sizer->Add(new wxStaticText(this, -1, _("Application Management")),0, wxALIGN_CENTER, 0);
-
-  //Image
-  sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(ApIcon64)),0, wxALIGN_CENTER, 0);
+  //Header
+  wxBoxSizer* headerSizer = new wxBoxSizer(wxHORIZONTAL);
+  {
+    //Image
+    headerSizer->Add(new wxStaticBitmap(this, -1, wxBitmap(ApIcon64)),0, wxALIGN_CENTER, 0);
+    wxBoxSizer* textSizer = new wxBoxSizer(wxVERTICAL);
+    //Title
+    textSizer->Add(new wxStaticText(this, -1, _("Application Management")),0, wxALIGN_LEFT, 0);
+
+    headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
+  }
+  sizer->Add(headerSizer, 0, wxALIGN_CENTER);
 
   //Applications
   wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("A&vailable Applications"));
@@ -127,22 +133,28 @@ void wxCDMAppliDescriptionPanel::CreateControls()
   actionsBox->GetStaticBox()->SetToolTip(wxT("Create a new application or make any change to the appli's CMakeLists.txt file by selecting the desired action."));
   wxPanel* actionsPanel = new wxPanel(this);
   wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL);
+  //actionsGrid Sizer
+  wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15);
 
-  wxButton* createApplicationbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_APPLICATION, _T("Create Application"));
+  wxButton* createApplicationbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_APPLICATION, _T("A. Create Application"));
   createApplicationbt->SetToolTip(wxT("Create a new application for this project."));
-  actionsPanelSizer->Add(createApplicationbt, 0, wxALL, 5);
-  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
+  actionsGridSizer->Add(createApplicationbt, 1, wxALL | wxEXPAND, 5);
+  wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("B. Edit CMakeLists File"));
   editCMakebt->SetToolTip(wxT("Open the system default text editor to edit the CMakeLists.txt file."));
   editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMAppliDescriptionPanel::OnCMakeMouseEnter,NULL,this);
   editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMAppliDescriptionPanel::OnCMakeMouseExit,NULL,this);
-  actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5);
-  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Applications Folder"));
+  actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5);
+  wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Applications Folder"));
   openFolderbt->SetToolTip(wxT("Open the appli folder in the file explorer."));
-  actionsPanelSizer->Add(openFolderbt, 0, wxALL, 5);
+  actionsGridSizer->Add(openFolderbt, 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, wxALL, 5);
+  actionsBox->Add(actionsPanel, 0, wxALL | wxEXPAND, 5);
   sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10);
 
   //Assign sizer