Avoid duplicating the same code in MSWGetBitmapForPath() and
CreateBitmap().
This also incidentally fixes SHDefExtractIcon() return value check,
which was inverted, in MSWGetBitmapForPath().
Use SHDefExtractIcon() to retrieve the most appropriately-sized icon
instead of always getting either the small or the large icon and then
scaling it ourselves to make it of the right size.
This results in incomparably better results for large icon sizes, e.g.
256*256, as can be seen in the artprov sample.
This way the first and only fallback language isn't necessarily the
msgid language (which is English most often). This is how GNU gettext
works -- it uses multiple fallback languages when multiple preferred
languages are set.
As a side effect, fixes#18227 in one possible way.
Use backticks around _UNICODE to avoid the special meaning of "_" in
Markdown.
Also use backticks around a couple of other identifiers/paths for
consistency.
lzma.h could not be found when building with wxUSE_LIBLZMA on macOS. Add
the found include directories and libraries from find_package(LibLZMA)
to the base library.
For consistency, add the include directories and libraries of all
find_package usage.
Closes https://github.com/wxWidgets/wxWidgets/pull/1024
Under wxMSW this method is re-entered due to triggering EVT_ACTIVATE when EVT_LEFT_UP is being already handled.
We need to prevent this to avoid generating spurious EVT_TEXT events and raising errors on calling SetFocus().
Closes#18260.
Add the handler earlier, as creating the handler main frame uses
wxArtProvider::GetBitmap() which can add the PNG handler on some
platforms (e.g. macOS, when using wxTangoArtProvider), so calling
wxImage::AddHandler() again after creating the frame could result in a
debug error message about adding the same handler twice.
We have to update index of the currently selected item if value of inserted item is the same as the value of currently selected item (we take lower index in this case) or if new item is inserted before the current selection (current selection index has to be increased in this case).
Closes#14153.
Sensitivity should be greater for high DPI displays to allow the user
clicking as far from the separator in this case as with standard DPI.
Also define a named constant for this value instead of using it
directly.
See https://github.com/wxWidgets/wxWidgets/pull/972
Dragging a column header in a wxHeaderCtrl and dropping it past the
rightmost column resulted in a crash due to accessing a column with
invalid index.
Fix this and correctly move the column to the last position when this
happens instead.
This bug notably affected dragging columns in wxGrid.
Closes https://github.com/wxWidgets/wxWidgets/pull/972
This fixes the access specifier effectively used for the members
following these macros, as it's changed to "public" inside them, meaning
that e.g. m_privateContextMenu was actually public even though it was
ostensibly declared in the private section and the intention was for it
to be private.
Closes#16038.
Previously it was set to true if content scale factor was less or equal
to 1 in some places or if it was strictly less than 2 in some others.
Fix this by adding a new helper SetEnableOffsetFromScaleFactor()
function and using it everywhere to consistently only enable offset for
non-high DPI displays in all cases.
Make wxDataViewCtrl::GetIremRect() work under all platforms and improve
tests, documentation and fix a couple of other problems in the same code
area.
See https://github.com/wxWidgets/wxWidgets/pull/1015