mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
a?adido t?tulo a la toolbar en windows y linux
This commit is contained in:
parent
088b17164b
commit
08c8f53e95
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
@ -22,6 +22,8 @@ public:
|
||||
QToolButton * serverButton;
|
||||
QToolButton * helpButton;
|
||||
QToolButton * fullscreenButton;
|
||||
|
||||
void setCurrentFolderName(const QString & name);
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
Loading…
Reference in New Issue
Block a user