Changeset View
Changeset View
Standalone View
Standalone View
libs/widgets/KoColorSetWidget.cpp
Context not available. | |||||
68 | colorNameCmb->clear(); | 68 | colorNameCmb->clear(); | ||
---|---|---|---|---|---|
69 | 69 | | |||
70 | if (colorSet) { | 70 | if (colorSet) { | ||
71 | for( int i = 0, p= 0; i < colorSet->nColors(); i++) { | 71 | for( quint32 i = 0, p= 0; i < colorSet->nColors(); i++) { | ||
72 | KoColorPatch *patch = new KoColorPatch(colorSetContainer); | 72 | KoColorPatch *patch = new KoColorPatch(colorSetContainer); | ||
73 | patch->setFrameStyle(QFrame::Plain | QFrame::Box); | 73 | patch->setFrameStyle(QFrame::Plain | QFrame::Box); | ||
74 | patch->setLineWidth(1); | 74 | patch->setLineWidth(1); | ||
75 | patch->setColor(colorSet->getColor(i).color); | 75 | KoColorSetEntry c = colorSet->getColorGlobal(i); | ||
76 | patch->setToolTip(colorSet->getColor(i).name); | 76 | patch->setColor(c.color); | ||
77 | patch->setToolTip(c.name); | ||||
77 | connect(patch, SIGNAL(triggered(KoColorPatch *)), thePublic, SLOT(colorTriggered(KoColorPatch *))); | 78 | connect(patch, SIGNAL(triggered(KoColorPatch *)), thePublic, SLOT(colorTriggered(KoColorPatch *))); | ||
78 | colorSetLayout->addWidget(patch, p/columns, p%columns); | 79 | colorSetLayout->addWidget(patch, p/columns, p%columns); | ||
79 | patch->setDisplayRenderer(displayRenderer); | 80 | patch->setDisplayRenderer(displayRenderer); | ||
80 | patchWidgetList.append(patch); | 81 | patchWidgetList.append(patch); | ||
81 | colornames.append(colorSet->getColor(i).name); | 82 | colornames.append(c.name); | ||
82 | QPixmap colorsquare = QPixmap(12,12); | 83 | QPixmap colorsquare = QPixmap(12,12); | ||
83 | colorsquare.fill(colorSet->getColor(i).color.toQColor()); | 84 | colorsquare.fill(c.color.toQColor()); | ||
84 | colorNameCmb->addItem(QIcon(colorsquare), colorSet->getColor(i).name); | 85 | colorNameCmb->addItem(QIcon(colorsquare), c.name); | ||
85 | ++p; | 86 | ++p; | ||
86 | } | 87 | } | ||
87 | } | 88 | } | ||
Context not available. |