ENH: dark mode of StateColor

Change-Id: I5928898c50280c7f2eedbb9389032230c7e251c4
This commit is contained in:
chunmao.guo 2022-10-31 14:12:14 +08:00 committed by Lane.Wei
parent faec57d263
commit b209243b27
20 changed files with 155 additions and 38 deletions

View file

@ -322,10 +322,13 @@ wxBitmap* BitmapCache::load_svg(const std::string &bitmap_name, unsigned target_
// map of color replaces
std::map<std::string, std::string> replaces;
if (dark_mode)
replaces["\"#808080\""] = "\"#FFFFFF\"";
if (!new_color.empty())
replaces["\"#ED6B21\""] = "\"" + new_color + "\"";
if (dark_mode) {
replaces["\"#262E30\""] = "\"#EFEFF0\"";
replaces["\"#323A3D\""] = "\"#B3B3B5\"";
replaces["\"#808080\""] = "\"#818183\"";
}
//if (!new_color.empty())
// replaces["\"#ED6B21\""] = "\"" + new_color + "\"";
NSVGimage *image = nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, replaces);
if (image == nullptr)