diff --git a/src/libtomahawk/widgets/breadcrumbbar.cpp b/src/libtomahawk/widgets/breadcrumbbar.cpp index 5a44408b9..6486ed02d 100644 --- a/src/libtomahawk/widgets/breadcrumbbar.cpp +++ b/src/libtomahawk/widgets/breadcrumbbar.cpp @@ -241,12 +241,15 @@ void BreadcrumbBar::currentIndexChanged() void BreadcrumbBar::setRootIcon(const QIcon &icon) { + m_rootIcon = icon; - QLabel *label= new QLabel(this); - label->setPixmap(icon.pixmap(16,16)); - m_layout->insertWidget(0, label); + QPushButton* button = new QPushButton(icon, "", this); + button->setFlat(true); + button->setStyleSheet( "QPushButton{ background-color: transparent; border: none; width:16px; height:16px;}" ); + m_layout->insertWidget(0, button); m_layout->insertSpacing(0,5); m_layout->insertSpacing(2,5); + connect(button, SIGNAL(clicked()), this, SIGNAL(rootClicked())); } void BreadcrumbBar::setRootText(const QString &text) diff --git a/src/libtomahawk/widgets/breadcrumbbar.h b/src/libtomahawk/widgets/breadcrumbbar.h index 999fc1ab0..d9cd6a6d5 100644 --- a/src/libtomahawk/widgets/breadcrumbbar.h +++ b/src/libtomahawk/widgets/breadcrumbbar.h @@ -129,6 +129,9 @@ public: */ void currentChangedTriggered(QModelIndex const& index); +signals: + void rootClicked(); + protected: /** * \brief append a crumb widget