From d65f51b41a9d84c501bb25bc3849ffd8446fb2e6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 20 Oct 2012 04:02:56 +0300 Subject: Fix palettes loading and using. --- src/gui/theme.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/theme.cpp') 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); } } } -- cgit v1.2.3-70-g09d2