mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-15 08:23:00 +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:
@@ -13,7 +13,11 @@ struct BitmapDC {
|
||||
wxBitmap bitmap;
|
||||
wxMemoryDC dc;
|
||||
|
||||
BitmapDC(const wxSize& size) : bitmap(size), dc(bitmap) {
|
||||
BitmapDC(const wxSize& size) : bitmap(size){
|
||||
#ifdef __WXOSX__
|
||||
bitmap.UseAlpha();
|
||||
#endif
|
||||
dc.SelectObject(bitmap);
|
||||
// Don't set white background - let the color patterns fill the entire area
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
}
|
||||
@@ -91,6 +95,8 @@ static wxBitmap create_single_filament_bitmap(const wxColour& color, const wxSiz
|
||||
BitmapDC bdc = init_bitmap_dc(size);
|
||||
if (!bdc.dc.IsOk()) return wxNullBitmap;
|
||||
|
||||
bdc.dc.SetBackground(wxBrush(color));
|
||||
bdc.dc.Clear();
|
||||
bdc.dc.SetBrush(wxBrush(color));
|
||||
bdc.dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user