From: Charles Kerr Date: Sun, 1 Aug 2010 19:56:42 +0000 (+0000) Subject: (trunk qt) #3470 "Add a bit of spacing to Qt Client's filterbar" -- experimental fix X-Git-Tag: 2.10~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9d741c9c16804d77060073e07a7024ef4895f42;p=transmission (trunk qt) #3470 "Add a bit of spacing to Qt Client's filterbar" -- experimental fix --- diff --git a/qt/filterbar.cc b/qt/filterbar.cc index 9cf0bfbb0..06683aa79 100644 --- a/qt/filterbar.cc +++ b/qt/filterbar.cc @@ -17,6 +17,7 @@ #include "favicon.h" #include "filters.h" #include "filterbar.h" +#include "hig.h" #include "prefs.h" #include "qticonloader.h" #include "torrent-filter.h" @@ -40,7 +41,7 @@ namespace { int getHSpacing( QWidget * w ) { - return qMax( 4, w->style()->pixelMetric( QStyle::PM_LayoutHorizontalSpacing, 0, w ) ); + return qMax( int(HIG::PAD_SMALL), w->style()->pixelMetric( QStyle::PM_LayoutHorizontalSpacing, 0, w ) ); } } @@ -398,7 +399,7 @@ FilterBar :: FilterBar( Prefs& prefs, TorrentModel& torrents, TorrentFilter& fil myIsBootstrapping( true ) { QHBoxLayout * h = new QHBoxLayout( this ); - int hmargin = style()->pixelMetric( QStyle::PM_LayoutHorizontalSpacing ); + const int hmargin = qMax( int(HIG::PAD), style()->pixelMetric( QStyle::PM_LayoutHorizontalSpacing ) ); h->setSpacing( 0 ); h->setContentsMargins( 2, 2, 2, 2 );