46 QColor truecolor; |
46 QColor truecolor; |
47 |
47 |
48 if (color == MainColor) |
48 if (color == MainColor) |
49 { |
49 { |
50 // Use the user preferences for the main color. |
50 // Use the user preferences for the main color. |
51 truecolor = config->mainColor(); |
51 truecolor = config::mainColor(); |
52 truecolor.setAlphaF(config->mainColorAlpha()); |
52 truecolor.setAlphaF(config::mainColorAlpha()); |
53 } |
53 } |
54 else |
54 else |
55 { |
55 { |
56 truecolor = color.faceColor(); |
56 truecolor = color.faceColor(); |
57 } |
57 } |
112 * |
112 * |
113 * Returns the user-preferred appearance for the main color. |
113 * Returns the user-preferred appearance for the main color. |
114 */ |
114 */ |
115 QColor GuiUtilities::mainColorRepresentation() |
115 QColor GuiUtilities::mainColorRepresentation() |
116 { |
116 { |
117 QColor result = {m_config->mainColor()}; |
117 QColor result = {config::mainColor()}; |
118 |
118 |
119 if (result.isValid()) |
119 if (result.isValid()) |
120 { |
120 { |
121 result.setAlpha(m_config->mainColorAlpha() * 255.f); |
121 result.setAlpha(config::mainColorAlpha() * 255.f); |
122 return result; |
122 return result; |
123 } |
123 } |
124 else |
124 else |
125 { |
125 { |
126 return QColor {0, 0, 0}; |
126 return QColor {0, 0, 0}; |
134 */ |
134 */ |
135 QVector<ColorToolbarItem> GuiUtilities::loadQuickColorList() |
135 QVector<ColorToolbarItem> GuiUtilities::loadQuickColorList() |
136 { |
136 { |
137 QVector<ColorToolbarItem> colors; |
137 QVector<ColorToolbarItem> colors; |
138 |
138 |
139 for (QString colorName : m_config->quickColorToolbar().split(":")) |
139 for (QString colorName : config::quickColorToolbar().split(":")) |
140 { |
140 { |
141 if (colorName == "|") |
141 if (colorName == "|") |
142 { |
142 { |
143 colors << ColorToolbarItem::makeSeparator(); |
143 colors << ColorToolbarItem::makeSeparator(); |
144 } |
144 } |