From 40bff19d8c851cc28b4b49c42a74346c7ea5a4da Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 24 May 2023 12:21:53 +0200 Subject: [PATCH] Debug Theme for OSX --- src/game_tab/left_panel/board/Theme.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game_tab/left_panel/board/Theme.cpp b/src/game_tab/left_panel/board/Theme.cpp index f72dfab..a8ffece 100644 --- a/src/game_tab/left_panel/board/Theme.cpp +++ b/src/game_tab/left_panel/board/Theme.cpp @@ -171,6 +171,10 @@ wxMask *Theme::RoundedMask(std::uint32_t width, std::uint8_t corner) { wxBitmap b(width, width, 1); wxMemoryDC dc; dc.SelectObject(b); + #ifdef __APPLE__ + wxGraphicsContext* gc = dc.GetGraphicsContext(); + gc->SetAntialiasMode(wxANTIALIAS_NONE); + #endif dc.SetPen(*wxBLACK_PEN); dc.SetBrush(*wxBLACK_BRUSH); dc.DrawRectangle(0, 0, width, width); @@ -193,5 +197,6 @@ wxMask *Theme::RoundedMask(std::uint32_t width, std::uint8_t corner) { dc.DrawRectangle(0, 0, width / 2, width); dc.DrawRectangle(0, 0, width, width / 2); } + dc.SelectObject(wxNullBitmap); // Required on OSX to unbind the wxBitmap return (new wxMask(b)); }