PRUSA 2.7.0

This commit is contained in:
sunsets
2023-12-27 18:02:35 +08:00
parent b33112327f
commit 0a3c63dcb1
488 changed files with 92371 additions and 29443 deletions

View File

@@ -405,9 +405,11 @@ wxBitmapBundle* BitmapCache::from_svg(const std::string& bitmap_name, unsigned t
// map of color replaces
std::map<std::string, std::string> replaces;
if (dark_mode)
replaces["\"#808080\""] = "\"#FFFFFF\"";
replaces["#808080"] = "#FFFFFF";
if (!new_color.empty())
replaces["\"#ED6B21\""] = "\"" + new_color + "\"";
replaces["#ED6B21"] = new_color;
replaces["#ButtonBG"] = dark_mode ? "#4E4E4E" : "#828282";
std::string str;
nsvgGetDataFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), str, replaces);
@@ -461,9 +463,9 @@ 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\"";
replaces["#808080"] = "#FFFFFF";
if (!new_color.empty())
replaces["\"#ED6B21\""] = "\"" + new_color + "\"";
replaces["#ED6B21"] = new_color;
NSVGimage *image = nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, replaces);
if (image == nullptr)