From 8bbc7ce607e21e9b34137dccc5f5dc05a6bab0b1 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 2 Jan 2014 13:05:25 +0100 Subject: [PATCH] Fix build on Mac. --- .../playlist/ColumnViewPreviewWidget.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/libtomahawk/playlist/ColumnViewPreviewWidget.cpp b/src/libtomahawk/playlist/ColumnViewPreviewWidget.cpp index 2af54e9db..9f0aa677f 100644 --- a/src/libtomahawk/playlist/ColumnViewPreviewWidget.cpp +++ b/src/libtomahawk/playlist/ColumnViewPreviewWidget.cpp @@ -42,7 +42,11 @@ ColumnViewPreviewWidget::ColumnViewPreviewWidget( ColumnView* parent ) QBoxLayout* mainLayout = new QVBoxLayout; setLayout( mainLayout ); +#ifndef Q_OS_MAC //we don't need to scale on OSX anyway mainLayout->addSpacing( TomahawkUtils::DpiScaler::scaledY( this, 8 ) ); +#else + mainLayout->addSpacing( 8 ); +#endif QBoxLayout* coverCenterLayout = new QHBoxLayout; mainLayout->addLayout( coverCenterLayout ); @@ -56,7 +60,11 @@ ColumnViewPreviewWidget::ColumnViewPreviewWidget( ColumnView* parent ) coverCenterLayout->addWidget( m_cover ); coverCenterLayout->addStretch(); +#ifndef Q_OS_MAC //we don't need to scale on OSX anyway mainLayout->addSpacing( TomahawkUtils::DpiScaler::scaledY( this, 16 ) ); +#else + mainLayout->addSpacing( 16 ); +#endif m_trackLabel = new QLabel( this ); m_trackLabel->setAlignment( Qt::AlignCenter ); @@ -76,7 +84,11 @@ ColumnViewPreviewWidget::ColumnViewPreviewWidget( ColumnView* parent ) m_artistLabel->setFont( font ); mainLayout->addWidget( m_artistLabel ); +#ifndef Q_OS_MAC //we don't need to scale on OSX anyway mainLayout->addSpacing( TomahawkUtils::DpiScaler::scaledY( this, 16 ) ); +#else + mainLayout->addSpacing( 16 ); +#endif QGridLayout* gridLayout = new QGridLayout; mainLayout->addLayout( gridLayout ); @@ -147,7 +159,11 @@ ColumnViewPreviewWidget::ColumnViewPreviewWidget( ColumnView* parent ) TomahawkUtils::unmarginLayout( mainLayout ); +#ifndef Q_OS_MAC //we don't need to scale on OSX anyway gridLayout->setSpacing( TomahawkUtils::DpiScaler::scaledX( this, 4 ) ); +#else + gridLayout->setSpacing( 4 ); +#endif }