Inherit from wxCompositeWindowSettersOnly<> to make sure all the usual
setters, such as SetForegroundColour() and SetFont(), called on
wxStaticBox are propagated to the label window too.
However also prevent SetBackgroundColour() from being propagated
unnecessarily -- because the checkbox already inherits the parent
background colour by default in wxMSW anyhow -- and still override
SetFont() to adjust the label window position after the font change,
otherwise it could be truncated after increasing the font size, for
example.
Because of these issues, wxCompositeWindowSettersOnly is not ideally
suited for its use here, but on balance it still seems to be better to
use it rather than reimplement parts of its functionality here.
Extract this class from wxCompositeWindow, as sometimes it can be
convenient to just define the setter functions to do the right thing for
a window containing sub-windows, but without dealing with focus too.
This will be used in wxMSW wxStaticBox in the next commit.
Erase background of the partially transparent native child controls,
such as wxCheckBox, using our own background colour if we have it
instead of using the parent's colour.
For some reason, we -- seemingly intentionally, judging from the comment
-- didn't do it before, but this meant that checkboxes inside static
boxes didn't inherit the box background colour, if it was set, which was
ugly and inconsistent with at least wxGTK. So do use our own background
if we have it now by just reusing the existing PaintBackground() instead
of manually using the parent background brush in WM_PRINTCLIENT handler.
As this class is only supposed to be used as a base class, its ctor
doesn't need to be, and hence ought not to be, public.
Also update an outdated comment stating that the ctor didn't do anything
when it, in fact, does perform an important task.
Remove wxSIZE_AUTO from the SetSize() call, this was completely
unnecessary and unexpectedly (and wrongly) resized composite windows
managed by sizers as SetLayoutDirection() side-effect.
Introduce symbolic constants instead of using raw magic numbers.
No real changes and these numbers are still as magic as before, but at
least they will be easier to change now.
This allows to call the protected wxWindowGTK::DoApplyWidgetStyle()
method when it's really necessary, e.g. when forwarding to it from
DoApplyWidgetStyle() implementation for another window.
Factor out the code from wxStaticBoxSizer dtor into a wxStaticBox method
to improve encapsulation: the static box knows better than another class
how to detach its children from it before destroying it.
No real changes yet.
Even though the value of this variable is not actually used in this
case, we still must initialize it to something before comparing with
NSGestureRecognizerState{Began,Ended} below.
Closes https://github.com/wxWidgets/wxWidgets/pull/645
Use wxDCClipper, now that it doesn't lose the previously set clipping
region any more, in wxGridCellStringRenderer::Draw() to ensure that we
don't overflow the area allocated for the cell.
Closes#17872.
Account for the empty lines explicitly by reserving enough vertical
space for them, as wxDC::GetTextExtent() wouldn't do it as it simply
returns 0 for empty strings.
Closes#18028.
GtkAssertDialog UI is now defined with GtkBuilder XML because
gtk_widget_push_composite_child() and gtk_widget_pop_composite_child() are
deprecated since 3.10 and composite widget templates should be used
to make composite children.
No real changes, but the code is slightly shorter, maybe more clear and
will be easier to maintain (because more difficult to break
accidentally) in the future.