Merge branch 'win-transparency'

Improve shaped sample and its documentation.

See #22230.
This commit is contained in:
Vadim Zeitlin
2022-03-28 00:16:31 +01:00
4 changed files with 102 additions and 39 deletions

View File

@@ -585,6 +585,13 @@ public:
/**
If the platform supports it will set the window to be translucent.
Note that in wxGTK this function must be called before the window is
shown the first time it's called (but it can be called again after
showing the window too).
See @ref page_samples_shaped "the shaped sample" for an example of
using this function.
@param alpha
Determines how opaque or transparent the window will be, if the
platform supports the operation. A value of 0 sets the window to be

View File

@@ -2395,7 +2395,9 @@ public:
Under wxGTK and wxOSX, you can use ::wxBG_STYLE_TRANSPARENT to obtain
full transparency of the window background. Note that wxGTK supports
this only since GTK 2.12 with a compositing manager enabled, call
IsTransparentBackgroundSupported() to check whether this is the case.
IsTransparentBackgroundSupported() to check whether this is the case,
see the example of doing it in @ref page_samples_shaped "the shaped
sample".
Also, in order for @c SetBackgroundStyle(wxBG_STYLE_TRANSPARENT) to
work, it must be called before Create(). If you're using your own