a?adido t?tulo a la toolbar en windows y linux

This commit is contained in:
Luis Ángel San Martín 2013-06-17 18:30:09 +02:00
parent 088b17164b
commit 08c8f53e95
3 changed files with 20 additions and 1 deletions

View File

@ -880,7 +880,15 @@ void LibraryWindow::loadCovers(const QModelIndex & mi)
{
TreeItem *item = static_cast<TreeItem*>(mi.internalPointer());
folderId = item->id;
#ifndef Q_OS_MAC
libraryToolBar->setCurrentFolderName(item->data(0).toString());
#endif
}
#ifndef Q_OS_MAC
else libraryToolBar->setCurrentFolderName(selectedLibrary->currentText());
#endif
//cambiado de orden, ya que al llamar a foldersFilter->clear() se invalidan los model index
if(foldersFilter->text()!="")
@ -901,6 +909,7 @@ void LibraryWindow::loadCovers(const QModelIndex & mi)
//comicView->setModel(NULL);
dmCV->setupModelData(folderId,dm->getDatabase());
comicView->setModel(dmCV);
comicView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
comicView->horizontalHeader()->setMovable(true);

View File

@ -13,7 +13,7 @@ YACReaderMainToolBar::YACReaderMainToolBar(QWidget *parent) :
{
mainLayout = new QHBoxLayout;
currentFolder = new QLabel(tr("Root"),this);
currentFolder = new QLabel(this);
currentFolder->setAlignment(Qt::AlignCenter);
currentFolder->setStyleSheet(" QLabel {color:#404040; font-size:22px; font-weight:bold;}");
@ -110,3 +110,11 @@ void YACReaderMainToolBar::addWideDivider()
addDivider();
mainLayout->addSpacing(3);
}
void YACReaderMainToolBar::setCurrentFolderName(const QString & name)
{
currentFolder->setText(name);
currentFolder->adjustSize();
currentFolder->move((width()-currentFolder->width())/2,(height()-currentFolder->height())/2);
}

View File

@ -22,6 +22,8 @@ public:
QToolButton * serverButton;
QToolButton * helpButton;
QToolButton * fullscreenButton;
void setCurrentFolderName(const QString & name);
signals:
public slots: