[vlc-devel] commit: Qt: locationBar: update when browsing back/up, show current bold ( Jakob Leben )

git version control git at videolan.org
Thu Jan 28 16:14:57 CET 2010


vlc | branch: master | Jakob Leben <jleben at videolan.org> | Thu Jan 28 16:13:36 2010 +0100| [2cd902362e84b9f18ca2a7508c035371bd0eaa7b] | committer: Jakob Leben 

Qt: locationBar: update when browsing back/up, show current bold

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2cd902362e84b9f18ca2a7508c035371bd0eaa7b
---

 .../gui/qt4/components/playlist/standardpanel.cpp  |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index fa2125c..d3e8e1f 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 );
 }




More information about the vlc-devel mailing list