Don't set default width every time the column is updated, as it happens
e.g. when it's clicked by the user, but only when it is created, by
moving the code added in 96d36383bd (Use sensible default column width
in generic wxListCtrl too, 2021-08-17) from SetItem() to the ctor of
wxListHeaderData.
Closes#19256.
Initialize m_ribbonBar added in the previous commit to NULL before
setting it to the correct value later, when wxRibbonButtonBar is fully
created.
See #19249.
Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
Fix crash introduced by 8e8a68c1b (Move code accessing bitmaps to
wxRibbonButtonBarButtonBase too, 2020-02-07) which start using
GetAncestorRibbonBar() in wxRibbonButtonBar code, without taking into
account that we may have no ribbon bar ancestor when the button bar is
shown in a popup frame, as it happens when there is not enough space to
show it fully in the main window itself.
Remember the ribbon bar in a member variable, relying on the fact that
we must have it in our parent chain when constructed, and just use it
later to avoid this.
Closes#19249.
Te changes of 74c51eaff2 (Fix formatting of wxMSW build instructions,
2021-07-13) broke the rendered output of "%WXWIN%", for some reason the
leading percent sign needs to be double to appear correctly inside the
backticks, so do it to fix this.
Closes#19260.
Don't say that the application needs to be compiled with the same
__WXDEBUG__ value, as this is not true since 3.0 days.
Also link the debugging overview.
There doesn't seem to be any reason to disallow copying these objects
and because they only have const methods, we can use reference counting
for them without bothering with copy-on-write, so it's simple to
implement.
This static function parses a subset of the language tags described in
BCP 47 (see https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
Use the tag, as specified by this function, rather than the locale
identifiers components under MSW, where this should allow us to use even
locales that can't be described using just language-script-region.
We don't use empty wxLocaleIdent as default user locale and it doesn't
make much sense to do it, as the default locale is already accessible
via wxUILocale::GetDefault().
No real changes, just don't make all wxLocaleIdent setters inline, this
is not necessary as none of these methods are performance-critical.
This commit is best viewed with --color-moved git option.
Use wxUIntPtr rather than (unsigned) long in wxImage::ResampleNearest()
as long is still 32 bits under Win64 and so doesn't allow the code there
to work with images larger than 2^16 in either direction, when it could
be allowed in this case.
Document the current limits on the size of the image and add a unit test
checking that resizing images of size greater than 2^16 works in 64 bits.
See #18550.
No real changes, just move this class declaration as it seems more
logical to have it in the same header with wxUILocale which is the only
place where it's used.
This commit is best viewed with --color-moved git option.
The only real change is that the part about building wxGTK under Cygwin
was removed, it wasn't very useful and shouldn't distract from other,
more important, information here.
Do this for consistency with the other ports and because this seems more
useful anyhow.
Update the documentation to make this behaviour more clear and document
this change as a (minor) incompatibility in wxMSW.
Also add more unit tests to check for this behaviour. Note this also
fixes the problem with the unit test added in the grandparent commit
under MSW.
This is explicitly allowed and we even have a unit test checking for
this, but the test crashed under macOS.
Fix this by simply doing nothing in wxWindow::DoEnable() if the window
is not created yet.
Just return NULL from this (wxOSX private, in spite of not using a
port-specific prefix) method.
This fixes crash in wxButton::SetBitmapXXX(wxNullBitmap), as shown by
the new test case which used to crash but doesn't do it any longer.
Closes#19257.
Set window position explictly to (0, 0) to avoid unwanted clipping
if defualt position selected by the system would place it (partially)
outside of the parent window.
Save initial affine transformations for just created CGContext
(like it's done in all wxMacCoreGraphicsContext ctors) to properly
manage user-defined transformations in SetTransform(),
GetTransform().
This is done to fix the build error in STL builds after the previous
commit, as using Find() or DeleteObject() with a pointer of the "base
type" worked when using wxWindowList in the default build, but not in
the STL build, so this commit avoids this mismatch by allowing to use a
base class pointer where it is safe to do so, i.e. where it can be done
without a downcast, as there doesn't seem to be any reason to have this
difference between the builds in this case.
Note that there is still a difference between Append() and Insert()
methods which (correctly) require the pointer of right type in STL build
but still accept a pointer of the base type in the default build for
compatibility reasons.
In particular, this means that one of the casts removed in the last
commit from wxWindowBase code needs to be restored, as Append() still
requires a wxWindow and not just a wxWindowBase.
This list uses wxWindowBase for its elements, so downcasts are
unnecessary and actually harmful as the downcast performed in the dtor
results in undefined behaviour because the object is not a wxWindow any
more by then (thanks to UBSAN for detecting this).
We need to use [NSString compare:options:range:locale:], as there is no
corresponding CFString function, so use NSLocale functions rather than
CFLocale ones too, for consistency.
No real changes.