diff widgets/PropertyBox.cpp @ 1199:73d43e410a6b levelpanwidget

Add swatches to colour map combo (optionally, as it turns out they are quite visually distracting)
author Chris Cannam
date Fri, 16 Dec 2016 15:55:59 +0000
parents 69ff93e0c624
children d421df27e184
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp	Fri Dec 16 14:16:05 2016 +0000
+++ b/widgets/PropertyBox.cpp	Fri Dec 16 15:55:59 2016 +0000
@@ -219,7 +219,7 @@
 	QLabel *showLabel = new QLabel(tr("Show"));
 	layout->addWidget(showLabel, 0, col++, Qt::AlignVCenter | Qt::AlignRight);
 
-	m_showButton = new LEDButton(Qt::blue);
+	m_showButton = new LEDButton(palette().highlight().color());
 	layout->addWidget(m_showButton, 0, col++, Qt::AlignVCenter | Qt::AlignLeft);
 	connect(m_showButton, SIGNAL(stateChanged(bool)),
 		this, SIGNAL(showLayer(bool)));
@@ -420,7 +420,6 @@
             cb->blockSignals(false);
         }
 
-	cb->setMinimumSize(QSize(10, cb->font().pixelSize() * 2));
         break;
     }        
 
@@ -435,7 +434,7 @@
 #ifdef DEBUG_PROPERTY_BOX 
 	    cerr << "PropertyBox: creating new colourmap combobox" << endl;
 #endif
-            cb = new ColourMapComboBox();
+            cb = new ColourMapComboBox(false);
             cb->setObjectName(name);
 
 	    connect(cb, SIGNAL(colourMapChanged(int)),
@@ -457,7 +456,6 @@
             cb->blockSignals(false);
         }
 
-	cb->setMinimumSize(QSize(10, cb->font().pixelSize() * 2));
         break;
     }        
 
@@ -543,13 +541,6 @@
         }
         cb->blockSignals(false);
 
-#ifdef Q_OS_MAC
-	// 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;
     }