]> granicus.if.org Git - transmission/commitdiff
(trunk qt) #3470 "Add a bit of spacing to Qt Client's filterbar" -- experimental fix
authorCharles Kerr <charles@transmissionbt.com>
Sun, 1 Aug 2010 19:56:42 +0000 (19:56 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sun, 1 Aug 2010 19:56:42 +0000 (19:56 +0000)
qt/filterbar.cc

index 9cf0bfbb08734ffbfca59eed294aac42b9ee9f2a..06683aa7933c08fb22c7f475ebee699a712e7985 100644 (file)
@@ -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 );