From f9d741c9c16804d77060073e07a7024ef4895f42 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 1 Aug 2010 19:56:42 +0000 Subject: [PATCH] (trunk qt) #3470 "Add a bit of spacing to Qt Client's filterbar" -- experimental fix --- qt/filterbar.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 );