X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMFileDescriptionPanel.cpp;h=e99603acf523f1ff414da26d0118e3ea62bb3549;hb=568ae730865efa12b53def3779d38067afd8963a;hp=2c54eae074e9320e717f8376e6d14611a86d3849;hpb=e6d99bba438e086b10239a42492532ff194edb88;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMFileDescriptionPanel.cpp b/lib/creaDevManagerLib/wxCDMFileDescriptionPanel.cpp index 2c54eae..e99603a 100644 --- a/lib/creaDevManagerLib/wxCDMFileDescriptionPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMFileDescriptionPanel.cpp @@ -77,6 +77,9 @@ bool wxCDMFileDescriptionPanel::Create( wxPanel::Create(parent, id, pos, size, style); this->file = file; CreateControls(); + // this part makes the scrollbars show up + this->FitInside(); // ask the sizer about the needed size + this->SetScrollRate(5, 5); return TRUE; } @@ -93,11 +96,11 @@ void wxCDMFileDescriptionPanel::CreateControls() returnLnk->SetWindowStyle(wxNO_BORDER); returnLnk->SetToolTip(crea::std2wx("Return to " + parents[parents.size()-1-i]->GetName() + ".")); linksSizer->Add(returnLnk, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 5); - if (i < (int)(parents.size())-1) - { - linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0); - } + linksSizer->Add(new wxStaticText(this,wxID_ANY, wxT("/")), 0, wxALIGN_CENTER, 0); } + + linksSizer->Add(new wxStaticText(this, wxID_ANY, crea::std2wx(this->file->GetName())), 0, wxALIGN_CENTER, 0); + sizer->Add(linksSizer, 0, wxALIGN_CENTER | wxALL, 5); //Header @@ -124,16 +127,16 @@ void wxCDMFileDescriptionPanel::CreateControls() wxStaticText *pLength = new wxStaticText(propertiesPanel, -1, wxT("File Size")); wxStaticText* pLocationtc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->file->GetPath())); - pLocationtc->SetMaxSize(wxSize(350,-1)); + pLocationtc->SetMaxSize(wxSize(300,-1)); int lgth = this->file->GetLength(); std::stringstream ss; ss << lgth / 1024; std::string lgths = ss.str() + " KB"; wxStaticText* pLengthtc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(lgths)); - propertiesGridSizer->Add(pLocation, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + propertiesGridSizer->Add(pLocation, 0, wxALIGN_RIGHT | wxALIGN_TOP); propertiesGridSizer->Add(pLocationtc, 1, wxEXPAND); - propertiesGridSizer->Add(pLength, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + propertiesGridSizer->Add(pLength, 0, wxALIGN_RIGHT | wxALIGN_TOP); propertiesGridSizer->Add(pLengthtc, 1, wxEXPAND); propertiesGridSizer->AddGrowableCol(1,1);