src/guiutilities.cpp

changeset 1432
4cc687851fbb
parent 1406
37fffb682d2f
child 1434
4c06435bd87f
equal deleted inserted replaced
1431:2e0e2c696605 1432:4cc687851fbb
132 /* 132 /*
133 * loadQuickColorList 133 * loadQuickColorList
134 * 134 *
135 * Returns a list of contents for the color toolbar, based on configuration. 135 * Returns a list of contents for the color toolbar, based on configuration.
136 */ 136 */
137 QVector<ColorToolbarItem> GuiUtilities::loadQuickColorList() 137 QVector<LDColor> GuiUtilities::loadQuickColorList()
138 { 138 {
139 QVector<ColorToolbarItem> colors; 139 return config::quickColorToolbar();
140
141 for (QString colorName : config::quickColorToolbar().split(":"))
142 {
143 if (colorName == "|")
144 {
145 colors << ColorToolbarItem::makeSeparator();
146 }
147 else
148 {
149 LDColor color {colorName.toInt()};
150
151 if (color.isValid())
152 colors.append(ColorToolbarItem {color});
153 }
154 }
155
156 return colors;
157 } 140 }
158 141
159 142
160 void setColorButton(QPushButton* button, LDColor color) 143 void setColorButton(QPushButton* button, LDColor color)
161 { 144 {

mercurial