X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bigscreen%2Ftheme.cpp;h=03a26c1c56c45776f7df2835f68068ff8f5f5d43;hb=cad5aff5a3a21bb8c95d8a265e93687234f46a43;hp=e873c9d9dfdcb3e16dee7e52bda4298e5384f89b;hpb=64356b45b3a6c41bc4d9c651fc4d02a6bd2d9c7b;p=ccbs diff --git a/bigscreen/theme.cpp b/bigscreen/theme.cpp index e873c9d..03a26c1 100644 --- a/bigscreen/theme.cpp +++ b/bigscreen/theme.cpp @@ -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]; }