src/ColorSelector.cc

changeset 644
93dcd1a0e4bd
parent 642
751a8df42842
equal deleted inserted replaced
643:a79277000830 644:93dcd1a0e4bd
109 col.setAlpha (gl_maincolor_alpha * 255.0f); 109 col.setAlpha (gl_maincolor_alpha * 255.0f);
110 } 110 }
111 111
112 QPen pen (info->edgeColor, penWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin); 112 QPen pen (info->edgeColor, penWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
113 m_scene->addRect (x, y, w, w, pen, col); 113 m_scene->addRect (x, y, w, w, pen, col);
114 QGraphicsTextItem* numtext = m_scene->addText (fmt ("%1", i)); 114 QGraphicsTextItem* numtext = m_scene->addText (format ("%1", i));
115 numtext->setDefaultTextColor ( (luma (col) < 80) ? Qt::white : Qt::black); 115 numtext->setDefaultTextColor ( (luma (col) < 80) ? Qt::white : Qt::black);
116 numtext->setPos (x, y); 116 numtext->setPos (x, y);
117 117
118 if (selection() && i == selection()->index) 118 if (selection() && i == selection()->index)
119 { 119 {
145 { 145 {
146 ui->colorLabel->setText ("---"); 146 ui->colorLabel->setText ("---");
147 return; 147 return;
148 } 148 }
149 149
150 ui->colorLabel->setText (fmt ("%1 - %2", selection()->index, selection()->name)); 150 ui->colorLabel->setText (format ("%1 - %2", selection()->index, selection()->name));
151 } 151 }
152 152
153 // ============================================================================= 153 // =============================================================================
154 // ============================================================================= 154 // =============================================================================
155 void ColorSelector::resizeEvent (QResizeEvent* ev) 155 void ColorSelector::resizeEvent (QResizeEvent* ev)

mercurial