]> git.sesse.net Git - ccbs/blobdiff - bigscreen/theme.cpp
Support different theming for odd/even rows.
[ccbs] / bigscreen / theme.cpp
index e873c9d9dfdcb3e16dee7e52bda4298e5384f89b..03a26c1c56c45776f7df2835f68068ff8f5f5d43 100644 (file)
@@ -57,6 +57,14 @@ std::string get_theme_config(const std::string &key, const std::string subkey)
                return config[key + "." + subkey];
        }
 
+       std::string modkey = key;
+       while (modkey.find_last_of(".") != std::string::npos) {
+               modkey.resize(modkey.find_last_of("."));
+               if (config.count(modkey + "." + subkey)) {
+                       return config[modkey + "." + subkey];
+               }
+       }
+
        return config["default." + subkey];
 }