Although white background was used if the brush was never set, setting
and resetting it nothing unexpectedly (and inconsistently with the other
ports) resulted in using black background.
Fix this by just resetting the brush to white if it's invalid, instead
of not setting it at all.
Since 848f5e78a6 the background wasn't
cleared at all if the background brush hadn't been explicitly set prior
to calling wxDC::Clear(). This was incompatible with the old behaviour
and even managed to break our own print preview code, so it clearly
wasn't a good idea to change Clear() like this.
Instead, continue to clear the DC using white background by default,
while still not doing anything if a transparent background brush had
been explicitly set.
This fixes print preview background under MSW.
See #10273, #18371.
This symbol can be predefined to use the libraries built with "vc14x" as
the compiler prefix. This can be useful to reuse the same binaries for
all ABI-compatible VC 14.x versions: 14.0 (MSVS 2015), 14.1 (2017) and
14.2 (2019).
Extend the description of library selection symbols used with MSVC to a
more general discussion of MSVC-specific symbols and document the
symbols affecting compiler prefix in this section too.
At least mention wxGraphicsContext and Bind() instead of only speaking
of wxDC and event tables.
Also mention sizers.
Do _not_ mention obsolete and deprecated wxList and friends.
Since wxBitmap can have both alpha channel values and mask we have to use
alpha channel (if required) in the sub-bitmap even if the mask is provided
too.
See #18513.
In the function wxMask::OSXCreate() to create a mask image, data copying
from the supplied memory buffer was not actually implemented and therefore
created mask was invalid.
Closes#18513.
Notably mention that showing modal dialogs won't work in this case.
Also link to this explanation from wxListCtrl documentation as
wxEVT_LIST_ITEM_SELECTED is one of the perhaps less expected cases in
which this problem arises.
See #9973.
Use setCurrentText(), which works for non-editable combo boxes as well
as for editable ones, instead of setEditText(), which only works for the
latter ones.
Closes https://github.com/wxWidgets/wxWidgets/pull/1542
Check that adding a window to either the same, or different, sizer the
second time asserts -- but that it can still be moved to another sizer
if it is detached from the first one first.
Also document that SetContainingSizer() should never be called from
outside the library.
See #17166.
Do not use DateTime_GetIdealSize or DTM_GETIDEALSIZE. They return
incorrect sizes after the DPI of the window has changed. For every DPI
change, the returned size is 4 pixels higher, even if the DPI is
lowered.
Improve the existing method to also take the minimum height of the
scroll-arrows into account.
Fix the row heights after a DPI change and adjust the column widths.
Use DPIChangedEvent instead of MSWUpdateFontOnDPIChange because the child
controls (m_clientArea, m_headerArea) need to update their font sizes first.
These control are drawn using a wxDC. When the DPI changes, call SetFont
to update the font of the wxDC. First call wxListBoxBase::SetFont() so
m_font is updated to the new DPI, then use this font in the wxDC.
For wxCheckListBox update the margins to fit the changed checkbox size.
The control seems to somehow react to DPI changes on its own (which is
rather mysterious as we don't forward WM_DPICHANGED to it, so it's not
really clear how does it do it, but it does) and changing its font is
worse than useless, as it's not just redundant, but also resets all the
styles used inside the control and so is really undesirable.
Hence override the just added MSWUpdateFontOnDPIChange() to do nothing
for rich edit controls, while still updating the font for the plain EDIT
ones (which is required as they don't scale correctly on their own).
Fix position of spin control in wxSpinCtrlDouble after DPI change
The old size of the control was used to determine the position. Use GetBestSize
instead, which will return the correct size.
Some native dialogs do not scale correctly (color picker, font picker,
open file with custom controls). ALl other native dialogs do scale correctly
(open file, open directory, find replace, print).
Change the DPI Awareness Context temporarily to SystemAware, so Windows handles
the scaling.
As the comments in the function explain, fread() may return a shorter
buffer than expected due to CRT's implicit conversion of DOS EOLs to
\n.
The logic for handling this was however broken: it NUL-terminated the
buffer appropriately, but that had no effect when later used in
wxString constructor, which used buffer's length for string length.
This resulted in slightly larger strings with uninitialized tails that
were mostly invisible to the user as the tail would disappear anywhere
the string was handled as a NULL-terminated C string. It also caused
occassional UTF-8 conversion failures when the tailing bytes didn't
form a valid sequence.
Fixed by using wxCharBuffer::shrink() to properly truncate the buffer.
* Adapt xcodeproj for iPhone to generic imaglist.cpp
* Fix the installation error in the iPhone minimal sample
Fix "Failed to install the requested application" error.