Using these two style flags in wxDataViewCtrl causes the library
to seg fault when trying to create the scrollbars. The wxDataViewCtrl
has scrollbars already without these flags.
Closes#17028
We can check wxPG_USE_RENDERER_NATIVE macro value directly and hence there
is no need to introduce and check a helper macro
wxPG_USE_NATIVE_FOCUS_RECT_RENDERER.
wxPGProperty of category type is drawn every time (with or without focus
rectangle) on the clear background so there is no need to erase focus
rectangle by overdrawing it in wxINVERT mode. It can be safely drawn in
wxCOPY mode.
See #16890.
After some recent changes bitmaps and icons with the type
wxBITMAP_TYPE_ICON could no longer be loaded. This implements a handler
for this (macOS only) bitmap type like the handler for
wxBITMAP_TYPE_ICON_RESOURCE.
No real changes, just remove the old code using wxINVERT logical
function which doesn't work with wxGTK3/wxMac anyhow and so is really
not worth keeping.
See #16890.
This is unnecessary, we only need to update the pending focus in the
immediate parent window to prevent a wrong radio button from being
focused (and hence selected) when it regains focus, there is no good
reason at all to interfere with the focus in the grandparent (and
higher) windows.
Doing this was not only useless, but actually harmful, as it overrode
explicit calls to SetFocus() in the user code, so just stop doing it.
This also allows to avoid having 2 functions related to this and keep
just a single virtual WXSetPendingFocus() one.
Closes#18653.
wxSetFocusToChild() could recurse to the parent TLW, which was clearly
nonsensical as it means that restoring last focus in a dialog could end
up setting it to the parent frame.
Fix this by breaking out of the loop as soon as we reach a TLW.
See #18653.
Remove the check that the size representation was the same as float and
as double, which was supposed to catch various edge cases (NaNs, huge
numbers etc) but actually caught plenty of perfectly valid font sizes
such as 13.8 that simply lost precision when converting from double to
float.
Just check that the size is positive and less than FLT_MAX to avoid
using values that really don't make sense as font sizes.
Also add a unit test checking that using fractional font sizes in
description string works as expected.
Closes#18590.
Closes https://github.com/wxWidgets/wxWidgets/pull/1707
MSVC++ doesn't seem to honour implicit int -> bool conversion and raises
warning C4800: "'int': forcing value to bool 'true' or 'false' (performance
warning)".
Previously, the column was updated, i.e. wxHeaderCtrl::UpdateColumn()
was called, after the column width was changed interactively by the
user. This was unnecessary and actually harmful as it resulted in
recursion and display corruption.
Stop doing this by adding yet another width-related function to the
generic wxDataViewColumn called WXOnResize(), which just updates the
main window display, but doesn't update the header at all, and calling
it instead of SetWidth(), which does both, when the column is resized.
Closes#18245.
If the width really changed, wxDataViewColumn::SetWidth() already calls
wxDataViewCtrl::OnColumnChange() (via UpdateWidth()), so it's
unnecessary to call the latter again immediately after calling the
former. And if the width didn't change, it's not necessary to call it at
all, so in either case the OnColumnChange() call can be just removed.
No real changes.