diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 3d5f1640..930c9307 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -135,7 +135,7 @@ void LibraryWindow::doLayout() #ifdef Q_OS_MAC libraryToolBar = addToolBar(tr("Library")); #else - libraryToolBar = new YACReaderMainToolBar; + libraryToolBar = new YACReaderMainToolBar(this); #endif //FLOW----------------------------------------------------------------------- diff --git a/YACReaderLibrary/yacreader_main_toolbar.cpp b/YACReaderLibrary/yacreader_main_toolbar.cpp index 011c579e..61f6a3da 100644 --- a/YACReaderLibrary/yacreader_main_toolbar.cpp +++ b/YACReaderLibrary/yacreader_main_toolbar.cpp @@ -100,6 +100,7 @@ void YACReaderMainToolBar::resizeEvent(QResizeEvent * event) QString clippedText = metrix.elidedText(currentFolderName, Qt::ElideRight, maxLabelWidth); currentFolder->setText(clippedText); + currentFolder->adjustSize(); currentFolder->move((event->size().width()-currentFolder->width())/2,(event->size().height()-currentFolder->height())/2); } @@ -135,6 +136,6 @@ void YACReaderMainToolBar::setCurrentFolderName(const QString & name) QString clippedText = metrix.elidedText(currentFolderName, Qt::ElideRight, maxLabelWidth); currentFolder->setText(clippedText); - + currentFolder->adjustSize(); currentFolder->move((width()-currentFolder->width())/2,(height()-currentFolder->height())/2); }