See image where the text is the same color as the background:
image.png (view on web)—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
It's suspicious (i.e. wrong) that we don't call SetForegroundColour() although we do call SetBackgroundColour() to change it to use wxSYS_COLOUR_INFOBK by default. This last colour is also special because it uses alpha, unlike all the other system colours (see "System colours" screen in the "drawing" sample).
In fact, I can reproduce the problem with the default GTK theme too. I'll fix it by setting foreground colour to something too, but it doesn't look like we handle background with alpha correctly, so maybe we need to use some other colour...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
It looks like the problem can be fixed by just not setting the colour at all, i.e.:
diff --git a/src/generic/richtooltipg.cpp b/src/generic/richtooltipg.cpp index 86ce912c8d..b4d997cf4e 100644 --- a/src/generic/richtooltipg.cpp +++ b/src/generic/richtooltipg.cpp @@ -178,11 +178,7 @@ public: colEnd = wxSystemSettings::SelectLightDark({0xe4, 0xe5, 0xf0}, {0x40, 0x40, 0x20}); } - else #endif // HAVE_MSW_THEME - { - colStart = wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK); - } } if ( colEnd.IsOk() ) @@ -198,7 +194,7 @@ public: SetBackgroundBitmap(bmp); } - else // Use solid colour. + else if ( colStart.IsOk() ) // Use solid colour. { SetBackgroundColour(colStart); }
but I don't understand why does setting the window shape work for you but nit for me, resulting in this ugly appearance (after removing setting the colour):
image.png (view on web)FWIW I see the same (the "transparent" part of the window being just black) in the "shaped" sample too. This is with Sway, so it's WM-specific and I don't know how important is it to fix this for Sway users, but this looks really bad.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
The tooltip shape looked ok on screen, but when screenshotting it overrode the background with alpha:
image.png (view on web)—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Does it work (as in "appear correctly on screen") after removing the fall back to wxSYS_COLOUR_INFOBK for you? If it does, I'll at least do this for now.
We should be able to have transparent wxPopupWindow if we move all transparency-related code currently in wxTopLevelWindowGTK down into wxNonOwnedWindow but this is a much more extensive change meriting its own issue...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I'm going to push the change above, this should at least make the text visible (unless you tell me it doesn't work for you, that is).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I haven't checked yet on that system.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()