diff widgets/PropertyBox.cpp @ 287:cd2492c5fe45

* Add SingleColourLayer to manage colours for layers that have a single predominant colour (i.e. most of them).
author Chris Cannam
date Thu, 12 Jul 2007 16:14:59 +0000
parents 9dd432665059
children 3101c68a00c1
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp	Wed Jul 11 20:46:37 2007 +0000
+++ b/widgets/PropertyBox.cpp	Thu Jul 12 16:14:59 2007 +0000
@@ -48,7 +48,7 @@
 #include <iostream>
 #include <cmath>
 
-#define DEBUG_PROPERTY_BOX 1
+//#define DEBUG_PROPERTY_BOX 1
 
 PropertyBox::PropertyBox(PropertyContainer *container) :
     m_container(container),
@@ -447,10 +447,7 @@
                 ColourDatabase *db = ColourDatabase::getInstance();
                 for (size_t i = 0; i < db->getColourCount(); ++i) {
                     QString name = db->getColourName(i);
-                    QColor colour = db->getColour(i);
-                    QPixmap pmap(12, 12);
-                    pmap.fill(colour);
-                    cb->addItem(pmap, name);
+                    cb->addItem(db->getExamplePixmap(i, QSize(12, 12)), name);
                 }
                 cb->addItem(tr("Add New Colour..."));
             }