Commit Graph

67405 Commits

Author SHA1 Message Date
Vadim Zeitlin
7a475e4695 Mention CFBundleLocalizations in the i18n overview
This is still completely undiscoverable, but slightly better than only
mentioning this in a Stack Overflow answer referencing a comment in the
bug tracker.

Closes #9659.
2019-10-25 04:10:23 +02:00
Vadim Zeitlin
288b570e11 Don't account for size grip under platforms not showing it
Size grip in generic wxStatusBar is only supported in wxGTK as it's
drawn using GTK functions, but this is not really a problem as other
platforms either use native implementations (MSW, Qt) or shouldn't show
size grip anyhow as it looks non-native (Mac).

So just ensure we don't leave space for the grip if it's not shown,
correcting the change of 6c1b2b23cf.

Closes #18469.
2019-10-25 04:10:23 +02:00
Vadim Zeitlin
616ad0d92b Show status bar fields coordinates in a message box in the sample
Showing them directly on the screen using wxClientDC doesn't work in all
ports, notable under Mac.

See #18469.
2019-10-25 04:10:23 +02:00
Steve Browne
3272509ae5 Prevent default OpenGL context creation in wxGLCanvas under macOS
This renders unnecessary the previous workarounds for using NSOpenGLView
as the base class for wxGLCanvas view, so revert them.

See:

- 2ab430965c which introduced the use of
  NSOpenGLView (see https://github.com/wxWidgets/wxWidgets/pull/846).
- ea68934b8e for the first workaround due
  to the use of NSOpenGLView and its default context creation.
- 6974a6ceaa for the refinement of the
  workaround above.
- e6ae83c386 and
  b822e9efe8 which tweaked it futher.

This commit renders unnecessary all the changes since the initial switch
to NSOpenGLView by just preventing NSOpenGLView from creating its own
context and thus enforcing the use of wxGLContext associated with
wxGLCanvas.

Closes https://github.com/wxWidgets/wxWidgets/pull/1617
2019-10-25 04:10:18 +02:00
Vadim Zeitlin
fc28ab659a Merge branch 'aui-tabart-high-dpi-fix'
Improve AUI tabs appearance in high DPI: scale the bitmaps to have
correct physical size for the current resolution.

See https://github.com/wxWidgets/wxWidgets/pull/1602
2019-10-25 00:31:16 +02:00
Vadim Zeitlin
55d033c68c Scale the bitmap in place in wxAuiScaleBitmap()
This makes the function simpler and is slightly more efficient.

No real changes.
2019-10-25 00:30:42 +02:00
Vadim Zeitlin
82f5c84a06 Remove trivial differences with master
No real changes.
2019-10-25 00:27:29 +02:00
Artur Wieczorek
b97bf311e0 Log widget class name for focus events in widgets sample
This shows better what is going on with focus and makes troubleshooting easier.
2019-10-24 21:00:35 +02:00
Paul Kulchenko
571fda28cf Add scaling of dock art as required by scaling. 2019-10-23 20:10:45 -07:00
Vadim Zeitlin
669e97c016 Ignore attempts to set order of empty wxMSWHeaderCtrl
This can happen when using wxGrid and calling UseNativeColHeader()
before adding any columns and shouldn't be fatal, so simply don't do
anything in this case.
2019-10-23 19:57:40 +02:00
Vadim Zeitlin
b8c9e6754d Merge branch 'msvc-warns'
Fix an annoying MSVC warning in SDK headers.

Remove wxUSE_IOSTREAMH.

See https://github.com/wxWidgets/wxWidgets/pull/1614
2019-10-23 19:50:14 +02:00
Artur Wieczorek
ec42121235 First check whether it is attempted to delete the root property
Because wxPGRootProperty has no parent, just like an unattached (waiting
for deletion) child wxPGProperty, so we have to first check whether
the property is the root and next whether it has a parent.
2019-10-23 18:05:40 +02:00
Artur Wieczorek
a60c5b36fe Don't attempt to delete root wxPGProperty in propgrid sample
The root wxPGProperty is not designed to be deleted so we should look
for a property to delete in the collection of its child properties.

Closes #18539.
2019-10-23 18:02:35 +02:00
Vadim Zeitlin
1b063e1dea Add a delay before calling wxDateTime::UNow() again in the test
Retrying immediately wasn't very useful, as the times must have been the
same during all loop iterations anyhow, so add a sleep to try to finally
fix the sporadic test failure on Travis.
2019-10-23 11:43:53 +02:00
Paul Cornett
ffac936882 Fix crash in propgrid sample, see #18537 2019-10-22 19:51:50 -07:00
Vadim Zeitlin
ab33227578 Merge branch 'fix-doc-oleauto-helpers' of https://github.com/PBfordev/wxWidgets
Improve OLE Automation classes documentation.

See https://github.com/wxWidgets/wxWidgets/pull/1615
2019-10-23 01:54:59 +02:00
PB
aa3e812d42 Add wxVariantDataSafeArray reference to wxOleConvertVariantFlags docs 2019-10-22 20:52:18 +02:00
PB
4f7a3fbbbd Restructure OLE-related doxygen documentation
All OLE-related classes and enums were described
in interface header msw/ole/automatn.h which led
to incorrectly listed include files in the generated
documentation for those classes and enum that
were actually declared in different include header files.

The documentation in the interface files has now been
split into files with names matching the actual include files.

Closes #18536
2019-10-22 20:46:13 +02:00
Vadim Zeitlin
dddbc1bafc Document that size of shaped windows can't be changed
Shaped windows have the size defined by the shape and it's not really
clear what calling SetSize() on them should do -- so just document that
it's not supposed to work.

Closes #9794.
2019-10-22 19:37:32 +02:00
Vadim Zeitlin
ed57a9ab7b Fix wxSlider::SetSize(-1, -1, -1, -1) under Mac
Instead of doing basically nothing, this call completely mislaid out the
control as -1 were used used literally instead of meaning "use the
current geometry", as they're supposed to. Fix this by handling
arguments with the value of -1 specially.

Such call was done by wxCompositeWindow::SetLayoutDirection() used by
the widgets sample and explained why the slider couldn't be seen when
switching to its page in this sample.

Closes #18442.
2019-10-22 19:28:02 +02:00
Vadim Zeitlin
8587a96d70 Remove unused member variable from listctrl sample
No real changes, just remove a stray declaration.
2019-10-22 18:49:32 +02:00
Vadim Zeitlin
3d488ef8a3 Replace INFO() with WARN() in wxDateTime::UNow() unit test
Another desperate attempt to understand how are failures such as the one
at https://travis-ci.org/wxWidgets/wxWidgets/jobs/601043830 possible.
2019-10-22 15:12:39 +02:00
Vadim Zeitlin
5d8fdcb874 Refactor common code into reusable MacGetPrinterName() function
No real changes, just add a simple helper function instead of
duplicating it in 2 different places.

This also provides a unique place to write the comment explaining why
PMPrinterGetID() is being used instead of PMPrinterGetName().

See #16774.
2019-10-22 02:55:49 +02:00
cosminp
7fa0074e1d Use unique printer ID as its name under macOS
Apparently, the user-readable name retrieved by PMPrinterGetName() is
not necessarily unique when multiple printers are available, so use
PMPrinterGetID() which is guaranteed to return a unique string.

Closes #16774.
2019-10-22 02:51:34 +02:00
Vadim Zeitlin
e34823a0c4 Stop using wx/ioswrap.h in the samples
This is not necessary any longer after wxUSE_IOSTREAMH removal and it
makes the sample code more clear.
2019-10-22 02:42:33 +02:00
Stefan Csomor
235e61c311 Implement macOS-specific wxDataViewCheckIconTextRenderer
This implementation suffers at least from 2 problems:

1. It doesn't support icons at all.
2. It toggles the checkbox when clicking on the text and not just on the
   checkbox itself, as would be expected.

but it's still better than the current version which simply doesn't work
at all, i.e. can't be toggled in any way (and also doesn't draw itself
correctly when using dark mode under macOS 10.14+), so use it for now.

A better solution would be to fix the problem with ActivateCell() not
working at all (see #17746) and update the code to respect drawing in
dark mode.

Closes #17473.

Closes https://github.com/wxWidgets/wxWidgets/pull/904
2019-10-21 21:14:54 +02:00
tm
fa3c0b1808 Document wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES system option
Make this option slightly more discoverable.

See #12429.
2019-10-21 21:14:54 +02:00
Vadim Zeitlin
8b95467256 Avoid crashing when using wxOverlay under macOS 10.14
Retain the graphics context for the helper overlay window as otherwise
it gets released leaving us with a dangling pointer.

Unfortunately this still doesn't make the existing code actually work.

See #18399.
2019-10-21 21:14:54 +02:00
Vadim Zeitlin
ad6799f249 Merge branch 'grid-uitests-gtk'
Fixes to wxUIActionSimulator allowing the tests using it to work for
wxGrid in wxGTK.

And some improvements and bug fixes to wxGrid itself.

Closes https://github.com/wxWidgets/wxWidgets/pull/1609
2019-10-21 21:12:01 +02:00
Vadim Zeitlin
271711b030 Get rid of spurious warning in CRT malloc.h with MSVS 2017
Recent MSVS 2017 versions (15.9.x) as well as MSVS 2019 give warning
C4548 about "expression before comma having no effect" when including
standard CRT headers.

This happens because when building projects targeting 8.1 SDK, as the
IDE uses the hard coded 10.0.240.0 version of UCRT headers in this case
(see \Common7\IDE\VC\VCTargets\Microsoft.Cpp.Common.props), and the
headers in this version haven't been, and will never be, updated to
avoid this warning, as was done in later 10.0.x UCRT versions.

Fix this by explicitly disabling the warning in wx/beforestd.h, as even
setting the warning level to 1 for the standard headers somehow isn't
enough to suppress it if it's enabled.
2019-10-21 20:52:49 +02:00
Vadim Zeitlin
fc711f869f Remove obsolete wxUSE_IOSTREAMH option
This is always 0 for any still supported compiler, so remove the option
and configure checks for it.

Still define it as 0 for compatibility, just in case it's used outside
of the library.
2019-10-21 20:46:21 +02:00
Vadim Zeitlin
416fc8582d Remove unused code inside MSVC 6 version checks
We don't support MSVC 6 (__VISUALC__ == 1200) or eVC (1201) since more
than 5 years (see f4b80e5337), so it's
useless to keep code compiled only when this compiler is used.
2019-10-21 20:36:08 +02:00
Ian McInerney
f867b04571 Recognize macOS 10.15 in wxGetOsDescription()
Closes https://github.com/wxWidgets/wxWidgets/pull/1613
2019-10-21 17:16:17 +02:00
Vadim Zeitlin
8949f441fd Also include build/msw/wx_setup.props with MSVC "Dev" binaries
This file is a dependency of wxwidgets.props and must be present.

Closes #18510.
2019-10-21 01:27:51 +02:00
Artur Wieczorek
6c1c621888 Add reference to the widgets sample in the documentation
Add reference to the description of the widgets sample wherever this
sample is mentioned in the documentation.
2019-10-20 21:37:44 +02:00
PB
9d4e116e8a Improve wxVariantDataSafeArray documentation
Improve the class description.

Mention that one needs to call wxAutomationObject::SetConvertVariantFlags()
with wxOleConvertVariant_ReturnSafeArrays to actually receive a
wxVariant with SAFEARRAY (if possible).

Make better use of now-documented wxSafeArray in the code examples.

Closes https://github.com/wxWidgets/wxWidgets/pull/1611
2019-10-20 18:37:57 +02:00
Vadim Zeitlin
f8289ffad5 Include wxwidgets.props into MSVS binaries distribution
Add wxMSVC_VERSION_ABI_COMPAT definition to the version of the file
included in the binary distribution to make it compatible with the
actual DLL names.

Closes #18510.
2019-10-20 17:06:07 +02:00
PB
51d2284da3 Add documentation for wxSafeArray
This wxMSW-only class was introduced in 3.0 but was not documented.

Closes https://github.com/wxWidgets/wxWidgets/pull/1610
2019-10-20 15:44:24 +02:00
Vadim Zeitlin
128608dc25 Fix mistake in wxDateTime::Tm struct documentation
yday field values starts from 0 and mday starts from 1, contrary to what
was actually written.

Closes #18534.
2019-10-20 15:37:13 +02:00
Artur Wieczorek
5925893eed Fix various doxygen issues in the documentation 2019-10-20 11:53:49 +02:00
Vadim Zeitlin
8d962b0121 Add a diagnostic message to wxDateTime::UNow() unit test
Try to understand what's going in Travis CI builds.
2019-10-19 23:05:32 +02:00
Vadim Zeitlin
248d4a8631 Fix size of the last column after the previous commit
The loop computing "colswidth" (the sum of widths including last column)
actually incorrectly computed "lastColX" (the sum of widths until the
last column), fix this.

See #18295.
2019-10-19 23:00:58 +02:00
Vadim Zeitlin
6af316b537 Auto size last visible column in generic wxDataViewCtrl
Resize the last visible column and not just the last column, which might
be hidden, to fill up all the available space.

See #18295.
2019-10-19 22:02:20 +02:00
Vadim Zeitlin
c6d2f6d9fe Really fix the standard button size in high DPI under MSW
Use "relative pixels" (known as DIPs in wx) instead of dialog units, as
the latter ones don't scale correctly due to rounding errors when using
high DPI.

Also take into account the fact that the 1px invisible border around the
visible part of the buttons is not scaled by the standard control, so
don't apply scaling to this part when determining the best size neither.

Closes #18528.
2019-10-19 21:41:18 +02:00
Vadim Zeitlin
20a8b04655 Don't increase the button height in wxMSWButton::GetFittingSize()
This results in buttons being forced to be too tall when using high DPI
and is useless anyhow, as all callers of this function deal with the
height by increasing it to the minimum acceptable value already (or
discard it entirely in wxMessageDialog::AdjustButtonLabels()).

See #18528.
2019-10-19 21:41:19 +02:00
Vadim Zeitlin
4fac71fc29 Merge branch 'per-monitor-dpi-aware-controls-3' of https://github.com/MaartenBent/wxWidgets
Add, or improve, per-monitor DPI awareness to/for more controls.

See https://github.com/wxWidgets/wxWidgets/pull/1589
2019-10-19 20:10:05 +02:00
Danny Scott
0a8cb849b5 Update to reflect use of vc14x binary in place of vc14[012]
Closes https://github.com/wxWidgets/wxWidgets/pull/1608
2019-10-19 20:08:01 +02:00
Vadim Zeitlin
c4e914784a Guard against Now() and UNow() returning different second values
Avoid spurious error in the unit test by calling Now() and UNow() a few
times in a row until they return the same second, as we may be unlucky
enough for this not to be the case when we call them just once.
2019-10-19 20:02:42 +02:00
Vadim Zeitlin
16619c5e77 Use DIPs for the margins around text in wxGrid columns
Improve the appearance on high DPI displays where the margins were
previously too small under MSW.
2019-10-19 18:31:50 +02:00
Vadim Zeitlin
f29b6564b1 Really fix recent regression in grid content autosizing
Fix autosizing broken in 3c72396a36 and
not fully fixed by f7e335c031.

Simplify the code to make it more obviously correct, by separating the
computation of the extent suitable for the label and determining the
size to use taking into account the extents of both the column data and
the its column.

Also add the unit test checking that auto-sizing works correctly in all
the different cases.

Closes https://github.com/wxWidgets/wxWidgets/pull/1600

Co-Authored-By: Ilya Sinitsyn <the_siv@mail.ru>
2019-10-19 18:28:03 +02:00