diff --git a/src/FbTk/ThemeItems.cc b/src/FbTk/ThemeItems.cc index ea3703c6..774a14d4 100644 --- a/src/FbTk/ThemeItems.cc +++ b/src/FbTk/ThemeItems.cc @@ -149,34 +149,30 @@ void ThemeItem::setFromString(const char *str) { cerr<<"Theme: Setting default value"< -void ThemeItem::load(const string *name, const string *altname) { +void ThemeItem::load(const string *o_name, const string *o_altname) { + const string &m_name = o_name ? *o_name : name(); + const string &m_altname = o_altname ? *o_altname : altName(); + + string effect(ThemeManager::instance().resourceValue(m_name+".effect", m_altname+".Effect")); + if (effect == "halo") { + Color halo_color(ThemeManager::instance().resourceValue(m_name+".halo.color", m_altname+".Halo.Color").c_str(), + theme().screenNum()); + + m_value.setHalo(true); + m_value.setHaloColor(halo_color); + } else if (effect == "shadow" ) { + Color shadow_color(ThemeManager::instance().resourceValue(m_name+".shadow.color", m_altname+".Shadow.Color").c_str(), + theme().screenNum()); + + m_value.setShadow(true); + m_value.setShadowColor(shadow_color); + m_value.setShadowOffX(atoi(ThemeManager::instance().resourceValue(m_name+".shadow.x", m_altname+".Shadow.X").c_str())); + m_value.setShadowOffY(atoi(ThemeManager::instance().resourceValue(m_name+".shadow.y", m_altname+".Shadow.Y").c_str())); + } }