src/colorSelector.cc

changeset 850
a3d72b0e916d
parent 844
11587d419d2f
child 852
cbd89b33f70d
equal deleted inserted replaced
849:4af6f977d04b 850:a3d72b0e916d
33 #include "ui_colorsel.h" 33 #include "ui_colorsel.h"
34 34
35 static const int g_numColumns = 16; 35 static const int g_numColumns = 16;
36 static const int g_squareSize = 32; 36 static const int g_squareSize = 32;
37 37
38 EXTERN_CFGENTRY (String, mainColor); 38 EXTERN_CFGENTRY (String, MainColor);
39 EXTERN_CFGENTRY (Float, mainColorAlpha); 39 EXTERN_CFGENTRY (Float, MainColorAlpha);
40 40
41 // ============================================================================= 41 // =============================================================================
42 // 42 //
43 ColorSelector::ColorSelector (LDColor defval, QWidget* parent) : QDialog (parent) 43 ColorSelector::ColorSelector (LDColor defval, QWidget* parent) : QDialog (parent)
44 { 44 {
107 QColor col (info.faceColor()); 107 QColor col (info.faceColor());
108 108
109 if (i == mainColorIndex) 109 if (i == mainColorIndex)
110 { 110 {
111 // Use the user preferences for main color here 111 // Use the user preferences for main color here
112 col = QColor (cfg::mainColor); 112 col = QColor (cfg::MainColor);
113 col.setAlpha (cfg::mainColorAlpha * 255.0f); 113 col.setAlpha (cfg::MainColorAlpha * 255.0f);
114 } 114 }
115 115
116 QPen pen (info.edgeColor(), penWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin); 116 QPen pen (info.edgeColor(), penWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
117 m_scene->addRect (x, y, w, w, pen, col); 117 m_scene->addRect (x, y, w, w, pen, col);
118 QGraphicsTextItem* numtext = m_scene->addText (format ("%1", i)); 118 QGraphicsTextItem* numtext = m_scene->addText (format ("%1", i));

mercurial