This fixes several minor bugs in the loading of `BI_BITFIELDS` bitmaps,
related to handling different header sizes and the colour and alpha
masks.
Closes#23601.
The old API allowed for users to directly test the variable and find if
it was null, so recreate that API with the new system to preserve
compatibility.
Closes#23445.
wxPG_PROP_ACTIVE_BTN and wxPG_PROP_SHOW_FULL_FILENAME can be used together
(like e.g. in wxFileProperty) so they can't share the same value
(wxPG_PROP_CLASS_SPECIFIC_1).
Closes#23565.
The code in b76ebc6 switched from wxList to std::vector but the changes
did not account that we must store the pointers to derived classes in
the entity list, not just the struct they derive from.
Closes#23582.
The related folder of the registry key (FEATURE_BROWSER_EMULATION)
should be created if it does not exist. Otherwise some of IE features
may not work depending on the level set.
Closes#23580.
The documentation used to warn that wxXXX_BOX styles were ignored unless
wxCAPTION was also specified, but this was actually wrong, at least for
wxOSX, which instead enabled wxCAPTION too if any of the BOX flags was
given.
And this behaviour seems more useful, as it's not really obvious why the
boxes are not shown otherwise, so make wxMSW behave like this too and
update the documentation.
Initialize at least boolean members when they are declared to ensure
that we don't forget to do it later (see #23593).
The other ones are already initialized later, normally, so don't touch
them for now.
No real changes.
Ensure that the local variable referenced via a pointer stored in
htmlRendInfo has a life-time long enough to still be valid by then.
Previously, accessing it after it went out of scope was undefined
behaviour and resulted in ASAN stack-use-after-scope error.
Closes#23592.
Don't hardcode white background in wxHtmlWindow, but use
wxSYS_COLOUR_WINDOW, as was already done in wxHtmlWinParser in case when
wxHtmlWindow was not used at all.
Also use wxSYS_COLOUR_WINDOWTEXT for the default foreground and
light/dark-mode dependent link colour instead of hardcoded blue. As a
side effect, this uses a more appropriate colour for the links in the
light mode as well.
Add a link to the lists test page in the HTML test sample to allow
testing the links appearance easily (links present in the other pages of
this sample use fixed colours specified in HTML itself).
This got broken in f3848673ab (Stop using wxList-based container in
wxHtmlWindow code, 2023-04-11): default-constructed std::list::iterator
is invalid, unlike the default-constructed compatibility_iterator used
before.
Move the check for multi-threaded COM apartment into a new helper
function and use it from both wxFileDialog and wxDirDialog, which should
be subject to the same problem.
Check that loading BMP files directly using wxDIB and via wxImage
built-in support for them produces the same result (which wasn't the
case for the RLE-compressed bitmaps until the last commit).
Remove the Init() helper initializing all members as we can now do it in
their declarations instead which is even better.
Also drop Free() which existed mostly for symmetry with Init().
As a side effect, this change allows to include this header from outside
the library (e.g. from the tests code), while previously it would result
in the following warning from gcc:
‘void wxDIB::Init()’ redeclared without dllimport attribute after being
referenced with dll linkage
No real changes, just don't say that this function calls CoInitialize()
because this is not the case any longer, and do advise using the RAII
wrapper instead of calling it directly.
Fall back to old style file dialogs in this case, as IFileDialog just
doesn't seem to support this COM threading model, as hinted at in
SHBrowseForFolder() documentation.
Also document this limitation.
Closes#23578.
Use month and weekday names in standalone context form, which can be
different in the one used for formatting dates in some languages, and
which needs to be used when the month or weekday names used are used on
their own, as here.
See #23191.
Implement wxUILocale::GetMonthName() and wxUILocale::GetWeekDayName() in
wxMSW, wxGTK, and wxOSX.
Also extend the existing wxDateTime methods to support a 3rd month and
weekday name representation (Name_Shortest) and a usage context
(Context_Formatting and Context_Standalone).
These changes make wxDateTime methods for getting the localized date and
month names use the current UI locale, as set by wxUILocale, instead of
the current C locale set by the standard C library function, which is a
change in behaviour but a desired one and notably fixes the display of
the months in generic calendar control in wxOSX where the current C
locale is not changed when the UI locale is set.
Replaces #23551.
Closes#23191.
Adjust the code to check for Windows sort order only after the last
underscore (instead of the first one).
This avoids misinterpreting locale tags like "zh_Hans_CN".
For wxOSX return "C" from GetName() for "en_US_POSIX" which is now
used as the standard "C" locale.
Also handle special locales "C" and "POSIX" properly in
wxLocaleIdent::FromTag().
Replace systemLocale by locale identified by en_US_POSIX because
systemLocale doesn't provide any reasonable month and weekday names
unlike the latter and this will be important for the upcoming commit.
This macro was mentioned in the docs added by 0ff1bdec09 (Add
wxFullScreenEvent for macOS, 2021-03-18), but its implementation was not
added by said commit.
Closes#23566.
The colour used for odd rows was much too light in the dark mode and was
actually much lighter than the colour used for the selection, which is
much more important than cosmetic zebra striping.
Fix this by strongly decreasing the lightness change in dark mode, from
50% to 10%, which results in using #363636 on #202020 which is the
default dark mode background in wxMSW, instead of #8f8f8f used before
(by comparison, light mode uses #f7f7f7 on #ffffff background).
See #12834.
Switch to using "DarkMode_Explorer" theme for it in dark mode, bringing
the following improvements:
1. Scrollbars are dark now, as they should be.
2. There are no vertical separator lines in the control any more, which
is unexpected and especially jarring because they misalign (by 1px)
with the header separators.
To make "DarkMode_Explorer" work we have to take care of drawing the
selected items ourselves, as they appear completely wrongly in this
theme by default, so do take care of this by changing the custom drawing
code to use the colours appropriate for both light and dark mode and
also fix yet another misalignment problem in it by changing the offset
used for the item rectangle: it's not clear why the offset, added back
in c9a695b777 (wxMSW: Fix incorrect subitem rect calculation in
wxListCtrl., 2012-09-07) differed for the first and non-first columns,
but the first column offset is off by 2px under both Windows 10 and
Windows 7 now, which resulted in a noticeable shift of custom-drawn
items compared to the normal ones.
The focus rectangle wasn't drawn correctly due to the of ClientHDC in
the painting code, which didn't work when using compositing.
Use the provided HDC, as in the rest of the drawing code, as it seems to
work fine now and the comment saying that it didn't, written back in
2006 was either erroneous or, more likely, out of date by now.
Creating Chinese locales such as zh_TW didn't work because this string
didn't appear in [NSLocale availableLocaleIdentifiers] return value,
as only the variants explicitly specifying the script were included.
Fix this by ignoring the script part when checking if the locale is
available. This should work well for zh_TW or zh_SG, which exist only in
a single script (traditional and simplified, respectively), but it's not
really clear whether it works, or what should we do if it doesn't work,
for zh_CN or zh_HK both of which exist in both scripts.
See #23209.
In addition to showing whether the locale is supported or not, show all
of its components to allow interactively verifying if an identifier is
being parsed correctly.
Disabled static controls looked ugly as greying out the label doesn't
work at all when the background is dark, so override their drawing in
this case and just draw them using the same grey-ish colour that is
already used for the disabled menu items.
This is somewhat of a hack, but doesn't seem to have any bad effects and
is much simpler than using owner-drawn controls.