summaryrefslogtreecommitdiff
path: root/src/gui/theme.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-20 04:02:56 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-20 13:55:43 +0300
commitd65f51b41a9d84c501bb25bc3849ffd8446fb2e6 (patch)
tree650a8cbdb4b33643e6465e74d85eb3fca6b428d2 /src/gui/theme.cpp
parent35efb9eba3a198b1dd2959434e82c8da45af689e (diff)
downloadmv-d65f51b41a9d84c501bb25bc3849ffd8446fb2e6.tar.gz
mv-d65f51b41a9d84c501bb25bc3849ffd8446fb2e6.tar.bz2
mv-d65f51b41a9d84c501bb25bc3849ffd8446fb2e6.tar.xz
mv-d65f51b41a9d84c501bb25bc3849ffd8446fb2e6.zip
Fix palettes loading and using.
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r--src/gui/theme.cpp8
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);
}
}
}