Fix:filament svg icon error

jira: STUDIO-10223
Change-Id: I93f805cfa7780e666b4e2f2430c4fcdfa3de0c8a
(cherry picked from commit e288462439ddf34db0bf10b55970d07ded662ccb)
This commit is contained in:
Mack
2025-02-11 11:30:06 +08:00
committed by Noisyfox
parent 013d83b62a
commit 0581ddd0ba
3 changed files with 41 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ void ColorPanel::OnPaint(wxPaintEvent &event)
std::string replace_color = m_color.GetAsString(wxC2S_HTML_SYNTAX).ToStdString();
std::string svg_name = "filament_green";
if (replace_color == "#FFFFFF00") {
svg_name = "filament_transparent";
svg_name = "filament_transparent2";
}
wxBitmap bmp = ScalableBitmap(this, svg_name, 40, false, false, false, { replace_color }).bmp();
dc.DrawBitmap(bmp, wxPoint(0,0));

View File

@@ -3177,7 +3177,7 @@ void ImGuiWrapper::filament_group(const std::string &filament_type, const char *
Slic3r::GUI::BitmapCache::parse_color4(hex_color, rgba);
std::string svg_path = "/images/filament_green.svg";
if (rgba[3] == 0x00) {
svg_path = "/images/filament_transparent.svg";
svg_path = "/images/filament_transparent2.svg";
}
BitmapCache::load_from_svg_file_change_color(Slic3r::resources_dir() + svg_path, img_size.x, img_size.y, transparent, hex_color);
ImGui::BeginGroup();