change the layout of the directory panel

Signed-off-by: Le Tan <tamlokveer@gmail.com>
This commit is contained in:
Le Tan 2016-10-13 21:15:20 +08:00
parent 1b220efb64
commit 88633d22da
2 changed files with 6 additions and 8 deletions

View File

@ -27,18 +27,15 @@ void VMainWindow::setupUI()
{
// Notebook directory browser tree
notebookLabel = new QLabel(tr("Notebook"));
directoryLabel = new QLabel(tr("Directory"));
notebookComboBox = new QComboBox();
notebookComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
directoryTree = new VDirectoryTree();
QHBoxLayout *nbTopLayout = new QHBoxLayout;
notebookComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
notebookComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
nbTopLayout->setAlignment(Qt::AlignLeft);
nbTopLayout->addWidget(notebookLabel);
nbTopLayout->addWidget(notebookComboBox);
QVBoxLayout *nbLayout = new QVBoxLayout;
nbLayout->addLayout(nbTopLayout);
nbLayout->addWidget(notebookLabel);
nbLayout->addWidget(notebookComboBox);
nbLayout->addWidget(directoryLabel);
nbLayout->addWidget(directoryTree);
QWidget *nbContainer = new QWidget();
nbContainer->setLayout(nbLayout);

View File

@ -38,6 +38,7 @@ private:
void initToolBar();
QLabel *notebookLabel;
QLabel *directoryLabel;
QComboBox *notebookComboBox;
VDirectoryTree *directoryTree;
VFileList *fileList;