39 QColor color; |
39 QColor color; |
40 |
40 |
41 if (ldColor == MainColor) |
41 if (ldColor == MainColor) |
42 { |
42 { |
43 // Use the user preferences for the main color. |
43 // Use the user preferences for the main color. |
44 color = m_config->mainColor(); |
44 color = configuration().mainColor(); |
45 color.setAlphaF(m_config->mainColorAlpha()); |
45 color.setAlphaF(configuration().mainColorAlpha()); |
46 } |
46 } |
47 else |
47 else |
48 color = ldColor.faceColor(); |
48 color = ldColor.faceColor(); |
49 |
49 |
50 // Paint the icon border |
50 // Paint the icon border |
99 * |
99 * |
100 * Returns the user-preferred appearance for the main color. |
100 * Returns the user-preferred appearance for the main color. |
101 */ |
101 */ |
102 QColor GuiUtilities::mainColorRepresentation() |
102 QColor GuiUtilities::mainColorRepresentation() |
103 { |
103 { |
104 QColor result = {m_config->mainColor()}; |
104 QColor result = {configuration().mainColor()}; |
105 |
105 |
106 if (result.isValid()) |
106 if (result.isValid()) |
107 { |
107 { |
108 result.setAlpha(m_config->mainColorAlpha() * 255.f); |
108 result.setAlpha(configuration().mainColorAlpha() * 255.f); |
109 return result; |
109 return result; |
110 } |
110 } |
111 else |
111 else |
112 { |
112 { |
113 return QColor {0, 0, 0}; |
113 return QColor {0, 0, 0}; |
121 */ |
121 */ |
122 QVector<ColorToolbarItem> GuiUtilities::loadQuickColorList() |
122 QVector<ColorToolbarItem> GuiUtilities::loadQuickColorList() |
123 { |
123 { |
124 QVector<ColorToolbarItem> colors; |
124 QVector<ColorToolbarItem> colors; |
125 |
125 |
126 for (QString colorName : m_config->quickColorToolbar().split(":")) |
126 for (QString colorName : configuration().quickColorToolbar().split(":")) |
127 { |
127 { |
128 if (colorName == "|") |
128 if (colorName == "|") |
129 { |
129 { |
130 colors << ColorToolbarItem::makeSeparator(); |
130 colors << ColorToolbarItem::makeSeparator(); |
131 } |
131 } |