From 198ad22f09579ee3e4026bc990a087863906d348 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Sun, 14 Aug 2011 17:15:46 -0400 Subject: [PATCH] Fix strange padding due to QPushButton incorrect layouting rect on OS X --- src/libtomahawk/viewmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libtomahawk/viewmanager.cpp b/src/libtomahawk/viewmanager.cpp index 5c734e299..be0148043 100644 --- a/src/libtomahawk/viewmanager.cpp +++ b/src/libtomahawk/viewmanager.cpp @@ -89,6 +89,10 @@ ViewManager::ViewManager( QObject* parent ) m_queueButton = new QPushButton(); m_queueButton->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ); m_queueButton->setText( tr( "Click to show queue" ) ); +#ifdef Q_OS_MAC + // QPushButtons on mac have lots of weird layouting issues. Fix them by forcing the widget rect for layout calculations + m_queueButton->setAttribute( Qt::WA_LayoutUsesWidgetRect ); +#endif m_queueView = new QueueView( m_splitter ); m_queueModel = new PlaylistModel( m_queueView );