summaryrefslogtreecommitdiff
path: root/src/gui/theme.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-31 17:07:13 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-31 17:33:20 +0300
commit6683d42b636619e02e2bcf98923a2fdbf44bd95b (patch)
tree7c7bb1c27fd1b756a428b639f098b51cdeb08b94 /src/gui/theme.cpp
parentd7c67fa2b6faa3e81269244224da4b72f045d659 (diff)
downloadplus-6683d42b636619e02e2bcf98923a2fdbf44bd95b.tar.gz
plus-6683d42b636619e02e2bcf98923a2fdbf44bd95b.tar.bz2
plus-6683d42b636619e02e2bcf98923a2fdbf44bd95b.tar.xz
plus-6683d42b636619e02e2bcf98923a2fdbf44bd95b.zip
Move functions getColor, getIdByChar from palette to theme and userpalette.
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r--src/gui/theme.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 7a6a49d45..c0a4e7bf7 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -1215,3 +1215,16 @@ ThemeInfo *Theme::loadInfo(const std::string &themeName)
}
return info;
}
+
+int Theme::getIdByChar(const signed char c, bool &valid) const
+{
+ const CharColors::const_iterator it = mCharColors.find(c);
+ if (it != mCharColors.end())
+ {
+ valid = true;
+ return (*it).second;
+ }
+
+ valid = false;
+ return 0;
+}