mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
FIX: Mac semi-translucent colors & suppress dialog flicker during system picker
• Official filament picker now renders semi-transparent colors correctly on macOS. • Disables the flicker prompt while the default system color picker is open. jira: STUDIO-13452 Change-Id: I6a83d3cf488114f92813e378b507f293d7c4254e (cherry picked from commit 4cd2c47f99f956681f41a1af0343efc9ad377684)
This commit is contained in:
@@ -683,15 +683,16 @@ wxBitmap *get_extruder_color_icon(std::string color, std::string label, int icon
|
||||
// there is no neede to scale created solid bitmap
|
||||
wxColor clr(color);
|
||||
bitmap = bmp_cache.insert(bitmap_key, wxBitmap(icon_width, icon_height));
|
||||
#ifndef __WXMSW__
|
||||
wxMemoryDC dc;
|
||||
#ifdef __WXOSX__
|
||||
bitmap->UseAlpha();
|
||||
wxMemoryDC dc(*bitmap);
|
||||
#else
|
||||
wxClientDC cdc((wxWindow *) Slic3r::GUI::wxGetApp().mainframe);
|
||||
wxMemoryDC dc(&cdc);
|
||||
dc.SelectObject(*bitmap);
|
||||
#endif
|
||||
dc.SetFont(::Label::Body_12);
|
||||
Slic3r::GUI::WxFontUtils::get_suitable_font_size(icon_height - 2, dc);
|
||||
dc.SelectObject(*bitmap);
|
||||
if (clr.Alpha() == 0) {
|
||||
int size = icon_height * 2;
|
||||
static wxBitmap transparent = *Slic3r::GUI::BitmapCache().load_svg("transparent", size, size);
|
||||
|
||||
Reference in New Issue
Block a user