]> git.sesse.net Git - vlc/commitdiff
Qt: playlist zoom: Enforce valid font point size
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 7 Sep 2011 11:05:38 +0000 (13:05 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 7 Sep 2011 11:06:22 +0000 (13:06 +0200)
modules/gui/qt4/components/playlist/playlist_model.cpp

index 54b4fbbe8adaabe544b10c3cc675d7104357bef2..5ef8b0f6ea190efa54f09f5e681ee10cb1875ce0 100644 (file)
@@ -370,7 +370,7 @@ QVariant PLModel::data( const QModelIndex &index, const int role ) const
     else if( role == Qt::FontRole )
     {
         QFont f;
-        f.setPointSize( f.pointSize() - 1 + i_zoom );
+        f.setPointSize( std::max( f.pointSize() - 1 + i_zoom, 1 ) );
         if( isCurrent( index ) )
             f.setBold( true );
         return QVariant( f );