wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
5.77k stars 1.7k forks source link

Don't make black transparent when drawing on wxOverlay under MSW #24490

Closed vadz closed 3 weeks ago

vadz commented 3 weeks ago

Using black as the transparent colour is not a great idea as everything drawn using it on the overlay just doesn't appear at all then.

Use a different colour that will hopefully be much less common.


@AliKet please let me know if you have any comments.

AliKet commented 3 weeks ago

Great, this is definitely the right thing to do and it should have been done this way from the beginning. 👍

AliKet commented 3 weeks ago

While you're at it, these can be updated after merging this PR: https://github.com/wxWidgets/wxWidgets/blob/ee309e078a2294d59c754b79c0407184e7558738/src/aui/framemanager.cpp#L92-L101 and this https://github.com/wxWidgets/wxWidgets/blob/ee309e078a2294d59c754b79c0407184e7558738/src/generic/splitter.cpp#L72-L81

i.e.:

static wxBitmap wxPaneCreateStippleBitmap()
{
    unsigned char data[] = { 0,0,0,192,192,192, 192,192,192,0,0,0 };
    wxImage img(2,2,data,true);
    return wxBitmap(img);
}