diff options
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r-- | src/gui/theme.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 2178228fc..54946984c 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -924,8 +924,8 @@ void Theme::loadColors(std::string file) continue; } - int paletteId = XML::getProperty(paletteNode, "id", 1); - if (paletteId < 1 || paletteId > THEME_PALETTES) + const int paletteId = XML::getProperty(paletteNode, "id", 1); + if (paletteId < 0 || paletteId >= THEME_PALETTES) continue; for_each_xml_child_node(node, paletteNode) @@ -942,8 +942,8 @@ void Theme::loadColors(std::string file) color = readColor(temp); grad = readColorGradient(XML::getProperty(node, "effect", "")); - - mColors[type * paletteId].set(type, color, grad, 10); + mColors[paletteId * THEME_COLORS_END + type].set( + type, color, grad, 10); } } } |