mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-25 06:05:15 +00:00
fix extruder color icons
This commit is contained in:
@@ -528,8 +528,10 @@ std::vector<wxBitmapBundle*> get_extruder_color_icons(bool thin_icon/* = false*/
|
|||||||
return bmps;
|
return bmps;
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (const std::string &color : colors)
|
for (const std::string &color : colors) {
|
||||||
bmps.emplace_back(get_solid_bmp_bundle(thin_icon ? 16 : 36, 16, color));
|
auto label = std::to_string(++index);
|
||||||
|
bmps.emplace_back(get_extruder_color_icon(color, label, thin_icon ? 16 : 36, 16));
|
||||||
|
}
|
||||||
|
|
||||||
return bmps;
|
return bmps;
|
||||||
}
|
}
|
||||||
@@ -580,6 +582,7 @@ wxBitmapBundle *get_extruder_color_icon(std::string color, std::string label, in
|
|||||||
dc.SetTextForeground(clr.GetLuminance() < 0.51 ? *wxWHITE : *wxBLACK);
|
dc.SetTextForeground(clr.GetLuminance() < 0.51 ? *wxWHITE : *wxBLACK);
|
||||||
dc.DrawText(label, (icon_width - size.x) / 2, (icon_height - size.y) / 2);
|
dc.DrawText(label, (icon_width - size.x) / 2, (icon_height - size.y) / 2);
|
||||||
dc.SelectObject(wxNullBitmap);
|
dc.SelectObject(wxNullBitmap);
|
||||||
|
bmpbndl = bmp_cache.insert_bndl(bitmap_key, bmp);
|
||||||
}
|
}
|
||||||
return bmpbndl;
|
return bmpbndl;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user