FolderNavigationWidget: use Utils::ElidingLabel as title

Otherwise, when entering a folder with a long name, the long title
causes the whole side bar to be expanded (and it cannot be even
resized smaller by hand).

Change-Id: I1611d2ca62e6260aeaed47dd993efa0a4243266d
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
J-P Nurmi
2013-01-09 15:32:45 +01:00
parent 4fdc0daa71
commit 4ef8bd534d

View File

@@ -47,6 +47,7 @@
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/elidinglabel.h>
#include <QDebug> #include <QDebug>
#include <QSize> #include <QSize>
@@ -135,7 +136,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent)
m_fileSystemModel(new FolderNavigationModel(this)), m_fileSystemModel(new FolderNavigationModel(this)),
m_filterHiddenFilesAction(new QAction(tr("Show Hidden Files"), this)), m_filterHiddenFilesAction(new QAction(tr("Show Hidden Files"), this)),
m_filterModel(new DotRemovalFilter(this)), m_filterModel(new DotRemovalFilter(this)),
m_title(new QLabel(this)), m_title(new Utils::ElidingLabel(this)),
m_autoSync(false), m_autoSync(false),
m_toggleSync(new QToolButton(this)) m_toggleSync(new QToolButton(this))
{ {