diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/ThemeItems.cc | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/src/FbTk/ThemeItems.cc b/src/FbTk/ThemeItems.cc index ea3703c..774a14d 100644 --- a/src/FbTk/ThemeItems.cc +++ b/src/FbTk/ThemeItems.cc | |||
@@ -149,34 +149,30 @@ void ThemeItem<Font>::setFromString(const char *str) { | |||
149 | cerr<<"Theme: Setting default value"<<endl; | 149 | cerr<<"Theme: Setting default value"<<endl; |
150 | } | 150 | } |
151 | setDefaultValue(); | 151 | setDefaultValue(); |
152 | } else { | ||
153 | string effect(ThemeManager::instance().resourceValue(name()+".effect", altName()+".Effect")); | ||
154 | if (effect == "halo") { | ||
155 | m_value.setHalo(true); | ||
156 | Color halo_color(ThemeManager::instance().resourceValue(name()+".halo.color", altName()+".Halo.Color").c_str(), | ||
157 | theme().screenNum()); | ||
158 | m_value.setHaloColor(halo_color); | ||
159 | |||
160 | } else if (effect == "shadow" ) { | ||
161 | Color shadow_color(ThemeManager::instance().resourceValue(name()+".shadow.color", altName()+".Shadow.Color").c_str(), | ||
162 | theme().screenNum()); | ||
163 | |||
164 | m_value.setShadow(true); | ||
165 | m_value.setShadowColor(shadow_color); | ||
166 | |||
167 | int offset_x = atoi(ThemeManager::instance().resourceValue(name()+".shadow.x", altName()+".Shadow.X").c_str()); | ||
168 | int offset_y = atoi(ThemeManager::instance().resourceValue(name()+".shadow.y", altName()+".Shadow.Y").c_str()); | ||
169 | if (offset_x != 0) | ||
170 | m_value.setShadowOffX(offset_x); | ||
171 | if (offset_y != 0) | ||
172 | m_value.setShadowOffY(offset_y); | ||
173 | } | ||
174 | } | 152 | } |
175 | } | 153 | } |
176 | 154 | ||
177 | // do nothing | ||
178 | template <> | 155 | template <> |
179 | void ThemeItem<Font>::load(const string *name, const string *altname) { | 156 | void ThemeItem<Font>::load(const string *o_name, const string *o_altname) { |
157 | const string &m_name = o_name ? *o_name : name(); | ||
158 | const string &m_altname = o_altname ? *o_altname : altName(); | ||
159 | |||
160 | string effect(ThemeManager::instance().resourceValue(m_name+".effect", m_altname+".Effect")); | ||
161 | if (effect == "halo") { | ||
162 | Color halo_color(ThemeManager::instance().resourceValue(m_name+".halo.color", m_altname+".Halo.Color").c_str(), | ||
163 | theme().screenNum()); | ||
164 | |||
165 | m_value.setHalo(true); | ||
166 | m_value.setHaloColor(halo_color); | ||
167 | } else if (effect == "shadow" ) { | ||
168 | Color shadow_color(ThemeManager::instance().resourceValue(m_name+".shadow.color", m_altname+".Shadow.Color").c_str(), | ||
169 | theme().screenNum()); | ||
170 | |||
171 | m_value.setShadow(true); | ||
172 | m_value.setShadowColor(shadow_color); | ||
173 | m_value.setShadowOffX(atoi(ThemeManager::instance().resourceValue(m_name+".shadow.x", m_altname+".Shadow.X").c_str())); | ||
174 | m_value.setShadowOffY(atoi(ThemeManager::instance().resourceValue(m_name+".shadow.y", m_altname+".Shadow.Y").c_str())); | ||
175 | } | ||
180 | } | 176 | } |
181 | 177 | ||
182 | 178 | ||