visual improvements
This commit is contained in:
parent
ef46d6e863
commit
c1d295a98b
2 changed files with 24 additions and 10 deletions
|
@ -25,14 +25,27 @@ TabDeckStorage::TabDeckStorage(Client *_client)
|
||||||
localDirView->setSortingEnabled(true);
|
localDirView->setSortingEnabled(true);
|
||||||
localDirView->header()->setResizeMode(QHeaderView::ResizeToContents);
|
localDirView->header()->setResizeMode(QHeaderView::ResizeToContents);
|
||||||
|
|
||||||
|
leftToolBar = new QToolBar;
|
||||||
|
leftToolBar->setOrientation(Qt::Horizontal);
|
||||||
|
leftToolBar->setIconSize(QSize(32, 32));
|
||||||
|
QHBoxLayout *leftToolBarLayout = new QHBoxLayout;
|
||||||
|
leftToolBarLayout->addStretch();
|
||||||
|
leftToolBarLayout->addWidget(leftToolBar);
|
||||||
|
leftToolBarLayout->addStretch();
|
||||||
|
|
||||||
QVBoxLayout *leftVbox = new QVBoxLayout;
|
QVBoxLayout *leftVbox = new QVBoxLayout;
|
||||||
leftVbox->addWidget(localDirView);
|
leftVbox->addWidget(localDirView);
|
||||||
|
leftVbox->addLayout(leftToolBarLayout);
|
||||||
leftGroupBox = new QGroupBox;
|
leftGroupBox = new QGroupBox;
|
||||||
leftGroupBox->setLayout(leftVbox);
|
leftGroupBox->setLayout(leftVbox);
|
||||||
|
|
||||||
toolBar = new QToolBar;
|
rightToolBar = new QToolBar;
|
||||||
toolBar->setOrientation(Qt::Vertical);
|
rightToolBar->setOrientation(Qt::Horizontal);
|
||||||
toolBar->setIconSize(QSize(24, 24));
|
rightToolBar->setIconSize(QSize(32, 32));
|
||||||
|
QHBoxLayout *rightToolBarLayout = new QHBoxLayout;
|
||||||
|
rightToolBarLayout->addStretch();
|
||||||
|
rightToolBarLayout->addWidget(rightToolBar);
|
||||||
|
rightToolBarLayout->addStretch();
|
||||||
|
|
||||||
serverDirView = new QTreeWidget;
|
serverDirView = new QTreeWidget;
|
||||||
serverDirView->header()->setResizeMode(QHeaderView::ResizeToContents);
|
serverDirView->header()->setResizeMode(QHeaderView::ResizeToContents);
|
||||||
|
@ -40,12 +53,12 @@ TabDeckStorage::TabDeckStorage(Client *_client)
|
||||||
|
|
||||||
QVBoxLayout *rightVbox = new QVBoxLayout;
|
QVBoxLayout *rightVbox = new QVBoxLayout;
|
||||||
rightVbox->addWidget(serverDirView);
|
rightVbox->addWidget(serverDirView);
|
||||||
|
rightVbox->addLayout(rightToolBarLayout);
|
||||||
rightGroupBox = new QGroupBox;
|
rightGroupBox = new QGroupBox;
|
||||||
rightGroupBox->setLayout(rightVbox);
|
rightGroupBox->setLayout(rightVbox);
|
||||||
|
|
||||||
QHBoxLayout *hbox = new QHBoxLayout;
|
QHBoxLayout *hbox = new QHBoxLayout;
|
||||||
hbox->addWidget(leftGroupBox);
|
hbox->addWidget(leftGroupBox);
|
||||||
hbox->addWidget(toolBar);
|
|
||||||
hbox->addWidget(rightGroupBox);
|
hbox->addWidget(rightGroupBox);
|
||||||
|
|
||||||
aUpload = new QAction(this);
|
aUpload = new QAction(this);
|
||||||
|
@ -55,15 +68,16 @@ TabDeckStorage::TabDeckStorage(Client *_client)
|
||||||
aDownload->setIcon(QIcon(":/resources/arrow_left_green.svg"));
|
aDownload->setIcon(QIcon(":/resources/arrow_left_green.svg"));
|
||||||
connect(aDownload, SIGNAL(triggered()), this, SLOT(actDownload()));
|
connect(aDownload, SIGNAL(triggered()), this, SLOT(actDownload()));
|
||||||
aNewFolder = new QAction(this);
|
aNewFolder = new QAction(this);
|
||||||
|
aNewFolder->setIcon(qApp->style()->standardIcon(QStyle::SP_FileDialogNewFolder));
|
||||||
connect(aNewFolder, SIGNAL(triggered()), this, SLOT(actNewFolder()));
|
connect(aNewFolder, SIGNAL(triggered()), this, SLOT(actNewFolder()));
|
||||||
aDelete = new QAction(this);
|
aDelete = new QAction(this);
|
||||||
aDelete->setIcon(QIcon(":/resources/remove_row.svg"));
|
aDelete->setIcon(QIcon(":/resources/remove_row.svg"));
|
||||||
connect(aDelete, SIGNAL(triggered()), this, SLOT(actDelete()));
|
connect(aDelete, SIGNAL(triggered()), this, SLOT(actDelete()));
|
||||||
|
|
||||||
toolBar->addAction(aUpload);
|
leftToolBar->addAction(aUpload);
|
||||||
toolBar->addAction(aDownload);
|
rightToolBar->addAction(aDownload);
|
||||||
toolBar->addAction(aNewFolder);
|
rightToolBar->addAction(aNewFolder);
|
||||||
toolBar->addAction(aDelete);
|
rightToolBar->addAction(aDelete);
|
||||||
|
|
||||||
retranslateUi();
|
retranslateUi();
|
||||||
setLayout(hbox);
|
setLayout(hbox);
|
||||||
|
|
|
@ -21,7 +21,7 @@ private:
|
||||||
QTreeView *localDirView;
|
QTreeView *localDirView;
|
||||||
QFileSystemModel *localDirModel;
|
QFileSystemModel *localDirModel;
|
||||||
QSortFilterProxyModel *sortFilter;
|
QSortFilterProxyModel *sortFilter;
|
||||||
QToolBar *toolBar;
|
QToolBar *leftToolBar, *rightToolBar;
|
||||||
QTreeWidget *serverDirView;
|
QTreeWidget *serverDirView;
|
||||||
QGroupBox *leftGroupBox, *rightGroupBox;
|
QGroupBox *leftGroupBox, *rightGroupBox;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue