26 : QWidget(parent, Qt::Popup),
28 m_lastHighlightedItem(0),
29 m_lastSelectedItem(0),
33 setMouseTracking(
true);
35 QVBoxLayout* layout =
new QVBoxLayout(
this);
55 layout->addWidget(preview);
60 for(
int i=0; i<this->layout()->count(); i++) {
63 item->setMouseTracking(
true);
64 item->setAttribute(Qt::WA_TransparentForMouseEvents);
111 QPainter painter(
this);
113 KConfigGroup cfg = KSharedConfig::openConfig()->group(
"advancedColorSelector");
115 if (cfg.readEntry(
"useCustomColorForBackground",
false)) {
116 p.fillRect(0,0,width(), height(), cfg.readEntry(
"customSelectorBackgroundColor", QColor(Qt::gray)));
118 p.fillRect(0,0,width(), height(), qApp->palette().window().color());
122 painter.setPen(QPen(palette().highlight(), 2));