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")),0, wxALIGN_CENTER, 0);
-
- //Image
- sizer->Add(new wxStaticBitmap(this, -1, wxBitmap(PkIcon64)),0, wxALIGN_CENTER, 0);
-
- //Package Name
- sizer->Add(new wxStaticText(this, -1, crea::std2wx(this->package->GetNamePackage())),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")),0, wxALIGN_LEFT, 0);
+ //Package Name
+ textSizer->Add(new wxStaticText(this, -1, crea::std2wx(this->package->GetNamePackage())),0, wxALIGN_LEFT, 0);
+ headerSizer->Add(textSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
+ }
+ sizer->Add(headerSizer, 0, wxALIGN_CENTER);
//Package Properties
wxStaticBoxSizer* propertiesBox = new wxStaticBoxSizer(wxVERTICAL, this, wxT("&Properties"));
{
wxHyperlinkCtrl* pBBlk = new wxHyperlinkCtrl(BBPanel,ID_LINK_SELECT_BLACKBOX, crea::std2wx(blackBoxes[i]->GetName().c_str()), crea::std2wx(blackBoxes[i]->GetName().c_str()));
+ pBBlk->SetWindowStyle(wxALIGN_LEFT);
std::string tt = "Author: " + blackBoxes[i]->GetAuthors() + "\nDescription: " + blackBoxes[i]->GetDescription() + "\nCategories: " + blackBoxes[i]->GetCategories();
pBBlk->SetToolTip(crea::std2wx(tt));
pBBlk->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnMouseEnter,NULL,this);
pBBlk->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnMouseExit,NULL,this);
- BBPanelSizer -> Add(pBBlk, 0, wxALIGN_LEFT | wxALL, 5);
+ BBPanelSizer -> Add(pBBlk, 0, wxEXPAND | wxALL, 5);
}
}
BBPanel->SetSizer(BBPanelSizer);
BBPanelSizer->Fit(BBPanel);
- BBBox->Add(BBPanel, 0, wxALL, 5);
-
+ BBBox->Add(BBPanel, 1, wxEXPAND | wxALL, 5);
sizer -> Add(BBBox, 0, wxEXPAND | wxALL, 10);
//Actions
wxStaticBoxSizer* actionsBox = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("&Actions"));
wxPanel* actionsPanel = new wxPanel(this);
wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL);
+ //actionsGrid Sizer
+ wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15);
- wxButton* createBBbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_BLACKBOX, _T("Create Black Box"));
+ wxButton* createBBbt = new wxButton(actionsPanel, ID_BUTTON_CREATE_BLACKBOX, _T("A. Create Black Box"));
createBBbt->SetToolTip(wxT("Create a new black box for the active project inside this package."));
- actionsPanelSizer->Add(createBBbt, 0, wxALL, 5);
- wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
+ actionsGridSizer->Add(createBBbt, 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 package's CMakeLists.txt file."));
editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnCMakeMouseEnter,NULL,this);
editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMPackageDescriptionPanel::OnCMakeMouseExit,NULL,this);
- actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5);
- wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("Open Package Folder"));
+ actionsGridSizer->Add(editCMakebt, 1, wxALL | wxEXPAND, 5);
+ wxButton* openFolderbt = new wxButton(actionsPanel, ID_BUTTON_OPEN_FOLDER, _T("C. Open Package Folder"));
openFolderbt->SetToolTip(wxT("Open the package 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, wxEXPAND);
+ actionsBox->Add(actionsPanel, 1, wxEXPAND);
sizer -> Add(actionsBox, 0, wxEXPAND | wxALL, 10);
//Assign sizer
if (((wxCDMMainFrame*)this->GetParent())->isHelp())
{
- std::vector<modelCDMCMakeListsFile*> files;
- wxCDMPackageHelpDialog* helpDialog = new wxCDMPackageHelpDialog(this->GetParent(), files, wxID_ANY);
+ wxCDMPackageHelpDialog* helpDialog = new wxCDMPackageHelpDialog(this->GetParent(), this->package, wxID_ANY);
helpDialog->Show(true);
}
}