diff widgets/PropertyBox.cpp @ 987:3f7cdfc56dce 3.0-integration

Merge from branch osx-retina
author Chris Cannam
date Wed, 01 Jul 2015 13:21:08 +0100
parents 98827470ada2 5d4730da0276
children c02c51ae5238 5c3333fb70b3
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp	Fri Jun 26 14:13:31 2015 +0100
+++ b/widgets/PropertyBox.cpp	Wed Jul 01 13:21:08 2015 +0100
@@ -63,6 +63,12 @@
     m_mainBox = new QVBoxLayout;
     setLayout(m_mainBox);
 
+#ifdef Q_OS_MAC
+    QMargins mm = m_mainBox->contentsMargins();
+    QMargins mmhalf(mm.left()/2, mm.top()/3, mm.right()/2, mm.bottom()/3);
+    m_mainBox->setContentsMargins(mmhalf);
+#endif
+
 //    m_nameWidget = new QLabel;
 //    m_mainBox->addWidget(m_nameWidget);
 //    m_nameWidget->setText(container->objectName());
@@ -521,8 +527,10 @@
         cb->blockSignals(false);
 
 #ifdef Q_OS_MAC
-	// Crashes on startup without this, for some reason
-	cb->setMinimumSize(QSize(10, 10));
+	// Crashes on startup without this, for some reason; also
+	// prevents combo boxes from getting weirdly squished
+	// vertically
+	cb->setMinimumSize(QSize(10, cb->font().pixelSize() * 2));
 #endif
 
 	break;