comparison widgets/PropertyStack.cpp @ 289:4ca7562dd246

* Add icon loader that automatically inverts icons where appropriate for (slightly) better display on a dark background
author Chris Cannam
date Fri, 13 Jul 2007 13:19:15 +0000
parents e6d0b097d102
children 226cb289bdf4
comparison
equal deleted inserted replaced
288:e27f546f83ad 289:4ca7562dd246
18 #include "base/PropertyContainer.h" 18 #include "base/PropertyContainer.h"
19 #include "view/View.h" 19 #include "view/View.h"
20 #include "layer/Layer.h" 20 #include "layer/Layer.h"
21 #include "layer/LayerFactory.h" 21 #include "layer/LayerFactory.h"
22 #include "widgets/NotifyingTabBar.h" 22 #include "widgets/NotifyingTabBar.h"
23 #include "widgets/IconLoader.h"
23 24
24 #include <QIcon> 25 #include <QIcon>
25 #include <QTabWidget> 26 #include <QTabWidget>
26 27
27 #include <iostream> 28 #include <iostream>
124 125
125 // Icons on other platforms 126 // Icons on other platforms
126 127
127 QString iconName = container->getPropertyContainerIconName(); 128 QString iconName = container->getPropertyContainerIconName();
128 129
129 QIcon icon(QString(":/icons/%1.png").arg(iconName)); 130 QIcon icon(IconLoader().load(iconName));
130 if (icon.isNull()) { 131 if (icon.isNull()) {
131 addTab(box, shortName); 132 addTab(box, shortName);
132 } else { 133 } else {
133 addTab(box, icon, QString("&%1").arg(i + 1)); 134 addTab(box, icon, QString("&%1").arg(i + 1));
134 setTabToolTip(i, name); 135 setTabToolTip(i, name);