mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -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());
|
TreeItem *item = static_cast<TreeItem*>(mi.internalPointer());
|
||||||
folderId = item->id;
|
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
|
//cambiado de orden, ya que al llamar a foldersFilter->clear() se invalidan los model index
|
||||||
if(foldersFilter->text()!="")
|
if(foldersFilter->text()!="")
|
||||||
@ -901,6 +909,7 @@ void LibraryWindow::loadCovers(const QModelIndex & mi)
|
|||||||
|
|
||||||
//comicView->setModel(NULL);
|
//comicView->setModel(NULL);
|
||||||
dmCV->setupModelData(folderId,dm->getDatabase());
|
dmCV->setupModelData(folderId,dm->getDatabase());
|
||||||
|
|
||||||
comicView->setModel(dmCV);
|
comicView->setModel(dmCV);
|
||||||
comicView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
|
comicView->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
|
||||||
comicView->horizontalHeader()->setMovable(true);
|
comicView->horizontalHeader()->setMovable(true);
|
||||||
|
@ -13,7 +13,7 @@ YACReaderMainToolBar::YACReaderMainToolBar(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
mainLayout = new QHBoxLayout;
|
mainLayout = new QHBoxLayout;
|
||||||
|
|
||||||
currentFolder = new QLabel(tr("Root"),this);
|
currentFolder = new QLabel(this);
|
||||||
currentFolder->setAlignment(Qt::AlignCenter);
|
currentFolder->setAlignment(Qt::AlignCenter);
|
||||||
currentFolder->setStyleSheet(" QLabel {color:#404040; font-size:22px; font-weight:bold;}");
|
currentFolder->setStyleSheet(" QLabel {color:#404040; font-size:22px; font-weight:bold;}");
|
||||||
|
|
||||||
@ -110,3 +110,11 @@ void YACReaderMainToolBar::addWideDivider()
|
|||||||
addDivider();
|
addDivider();
|
||||||
mainLayout->addSpacing(3);
|
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 * serverButton;
|
||||||
QToolButton * helpButton;
|
QToolButton * helpButton;
|
||||||
QToolButton * fullscreenButton;
|
QToolButton * fullscreenButton;
|
||||||
|
|
||||||
|
void setCurrentFolderName(const QString & name);
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user