wxComboCtrl consists of several controls (text entry, button, popup) and therefore should be implemented as a wxCompositeWindow to prevent problems with generating spurious events when e.g. focus is transferred between the sub-controls.
Closes#18394.
We could end up with 0 max total width because we could assign the value
of the child max total width, which could have been 0, just because the
child "width", which is actually the total available width for the
container cells (and a child of a container cell can, of course, be
another container cell), was greater than our own total width so far.
This is confusing because it might be expected that "width" is always
less than "max total width", but actually this is (almost) never the
case for the container cells.
Closes#10263.
This makes it easier to see which cell is which one when debugging.
Also use GetMaxTotalWidth() instead of GetWidth(), as the former is more
useful for container cells (and the same for the other ones).
MSW-specific scaling was done for the initial maximum value in Create(),
but not if the maximum was changed later in SetMaximum(). Now do it
there as well.
Closes https://github.com/wxWidgets/wxWidgets/pull/1497
Use the same logic for wxGTK (and other platforms using double
buffering) as was already used for wxMac, it seems to result in less
flicker.
Closes#18017.
This could have been unexpected even if it worked as designed and,
unlike with direct calls to Normalize(), there was no way to prevent
this from happening.
Worse, even when no expansion was done, the simple fact of calling
wxExpandEnvVars() could result in replacing "dir\$file" with "dir$file"
as the backslash is considered as an escape character by this function
and hence break the file name structure.
Closes#17977.
Explain how these methods actually work, remove a very (from wx 1.x
days?) outdated reference to wxPanel always calling Layout() and mention
the special case of wxTopLevelWindow in the overview too.
Ideal would be to completely get rid of the DoLayout() method later,
however this method seems to be used in the existing applications, so
for now it needs to be kept.
It makes sense for explicit calls to Layout() to use the same logic as
is implicitly used when a TLW is resized, so override it to use
TLW-specific logic instead of using a separate DoLayout() for this.
Note that DoLayout() still has to be preserved because Debian code
search finds at least a couple of examples of its use outside the
library, meaning that there are probably quite a few more of them in the
wild.
Also, wxTopLevelWindow still needs its own wxEVT_SIZE handler because
the base class only calls Layout() if GetAutoLayout() is true, while we
want it to be always called. This might be worked around by just calling
SetAutoLayout(true) in wxTopLevelWindow ctor, but it seems safer, from
compatibility point of view, to keep wxTopLevelWindow::OnSize() instead.
See #18472.
This is simpler to use than wxDisplay(window).GetPPI() which was used
instead of it so far in all ports and can be implemented more
efficiently for wxMSW.
Remove wxGetWinTLW, GetDPI already tries to get the top window.
This is similar to 228cd926e2, but extends
the fix to v1 strings, as even though they have the "point size" field,
this field may still contain 0, resulting in the same problem as with v0
strings, i.e. 0-sized fonts.
Closes#18467.
This is a better fix for the problem with NSOpenGLView having wrong size
after resizing the window under 10.14.5 (only): reset the context when
making the context current, to ensure that the up-to-date size is used.
See #18402.
Explicitly use the white brush when erasing background of the bitmap
used for print preview, to match the printed page appearance. Somehow it
worked even without this under other platforms before, but logically
resulted in black background under wxGTK 3.
Closes https://github.com/wxWidgets/wxWidgets/pull/1476Closes#18371.
Draw the same shape in wxDC::DrawCheckMark() under all platforms and
provide wxRenderer::DrawCheckMark() for drawing the platform-specific
shape.
Also fix wxGCDC::DrawPoint() to use the default one point wide pen.
See https://github.com/wxWidgets/wxWidgets/pull/1471
Even though both MSVC and gcc seem to silently ignore everything coming
after "#endif", it's still wrong to have anything but a comment after
it.
See commit 881aabf63e