[vlc-commits] Qt: playlist zoom: Enforce valid font point size
Francois Cartegnie
git at videolan.org
Wed Sep 7 13:04:26 CEST 2011
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep 7 13:05:38 2011 +0200| [ea17bdc31183b303fff336870d9f6bcb39b78963] | committer: Francois Cartegnie
Qt: playlist zoom: Enforce valid font point size
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea17bdc31183b303fff336870d9f6bcb39b78963
---
.../gui/qt4/components/playlist/playlist_model.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 54b4fbb..5ef8b0f 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -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 );
More information about the vlc-commits
mailing list