return config["default." + subkey];
}
-void fill_background(unsigned char *buf, unsigned width, unsigned height)
+void fill_background(unsigned char *buf, const std::string &screen_name, unsigned width, unsigned height)
{
- int bg_r = atoi(get_theme_config("background", "red").c_str());
- int bg_g = atoi(get_theme_config("background", "green").c_str());
- int bg_b = atoi(get_theme_config("background", "blue").c_str());
+ std::string key = "background." + screen_name;
+ int bg_r = atoi(get_theme_config(key, "red").c_str());
+ int bg_g = atoi(get_theme_config(key, "green").c_str());
+ int bg_b = atoi(get_theme_config(key, "blue").c_str());
unsigned char *ptr = buf;
for (unsigned i = 0; i < width * height; ++i) {