From 2cd902362e84b9f18ca2a7508c035371bd0eaa7b Mon Sep 17 00:00:00 2001 From: Jakob Leben Date: Thu, 28 Jan 2010 16:13:36 +0100 Subject: [PATCH] Qt: locationBar: update when browsing back/up, show current bold --- modules/gui/qt4/components/playlist/standardpanel.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp index fa2125c933..d3e8e1f89f 100644 --- a/modules/gui/qt4/components/playlist/standardpanel.cpp +++ b/modules/gui/qt4/components/playlist/standardpanel.cpp @@ -433,21 +433,25 @@ void LocationBar::setIndex( const QModelIndex &index ) QModelIndex i = index; QFont font; QFontMetrics metrics( font ); + font.setBold( true ); while( true ) { - QToolButton *btn = new QToolButton; PLItem *item = model->getItem( i ); + + QToolButton *btn = new QToolButton; char *fb_name = input_item_GetTitleFbName( item->inputItem() ); QString text = qfu(fb_name); free(fb_name); text = QString("/ ") + metrics.elidedText( text, Qt::ElideRight, 150 ); btn->setText( text ); - btn->setToolButtonStyle( Qt::ToolButtonTextBesideIcon ); + btn->setFont( font ); prev = insertWidget( prev, btn ); mapper->setMapping( btn, item->id() ); CONNECT( btn, clicked( ), mapper, map( ) ); + font = QFont(); + if( i.isValid() ) i = i.parent(); else break; } @@ -456,5 +460,6 @@ void LocationBar::setIndex( const QModelIndex &index ) void LocationBar::invoke( int i_id ) { QModelIndex index = model->index( i_id, 0 ); + setIndex( index ); emit invoked ( index ); } -- 2.11.4.GIT