Commit Graph

72671 Commits

Author SHA1 Message Date
Vadim Zeitlin
5f469f481a Merge branch 'wxwidgets.org-tests'
Don't fail CI if wxwidgets.org is not available or behind Cloudflare
proxy.

See #22350.
2022-04-23 20:37:00 +02:00
Vadim Zeitlin
da05a3770f Use address of www.wxwidgets.org instead of its name in HTTP URLs
The name resolves to Cloudflare proxy which redirects all HTTP URLs to
HTTPS, which breaks the existing tests using HTTP, so prevent this from
happening by using the actual IP address instead.
2022-04-23 18:03:25 +01:00
Vadim Zeitlin
9c4fe82242 Cache the results of network availability check
It's unlikely to change while the tests are running, so don't redo it
needlessly.
2022-04-23 17:55:24 +01:00
Vadim Zeitlin
239bbd6b82 Check that we can actually read from network and not just connect
When using Cloudflare, as we do for www.wxwidgets.org, the connection
succeeds as long as Cloudflare itself works, but reading later fails if
the real server behind Cloudflare proxy does not, so check if we can
read something from it.
2022-04-23 17:55:24 +01:00
Uwe Runtemund
28f62b2e59 Add support for creating wxBitmapBundle from wxIconBundle
This is useful for converting existing code using wxIconBundle for
similar purposes to switch to using wxBitmapBundle instead.

Closes #22347.
2022-04-23 17:31:46 +02:00
Vadim Zeitlin
860dd39fab Check connection to www.wxwidgets.org and not www.google.com
Our tests use the former and not the latter, so check connection to the
site we're actually interested in.
2022-04-23 16:16:01 +01:00
Vadim Zeitlin
668563f2b0 Rewrite ImageTestCase using CATCH macros
Get rid of the ugly WX_ASSERT_MESSAGE() and also use REQUIRE/CATCH
directly instead of CppUnit compatibility macros.

Also use sections to execute the next loop iteration(s) even if the
current one fails.

This commit is best viewed ignoring whitespace-only changes.
2022-04-23 16:08:14 +01:00
Vadim Zeitlin
89a7a070ea Use WARN() instead of wxLogWarning() in the unit tests
The latter isn't shown at all by default while the former one is.
2022-04-23 15:36:40 +01:00
Vadim Zeitlin
684dd4a5a6 Use wxScopedPtr in wxImage unit test
Don't manage memory manually, this resulted in error leaks if any checks
failed.
2022-04-23 15:35:22 +01:00
Vadim Zeitlin
c4dc0353cc Fix wxGTK1 build after adding wxBitmap(wxImage, wxDC) ctor
This fixes a compilation problem introduced in 24970061fa (Add
wxBitmap(wxImage, wxDC) ctor to all ports, 2022-04-12).
2022-04-23 15:04:25 +02:00
Paul Cornett
a261c80298 Avoid Gdk-CRITICAL warnings when using PopupMenu() with Wayland 2022-04-22 09:58:02 -07:00
Stefan Csomor
184a1fa244 reuse already existing method for turning off tabbing by default 2022-04-22 18:04:28 +02:00
Stefan Csomor
86e485c8d8 suppress adding automatic menu items on macOS
see #22210
2022-04-22 17:46:14 +02:00
Maarten Bent
b50633f440 Fix bitmap size when saving image in drawing sample
wxBitmap::CreateWithDIPSize expects an DPI independent size.
And when saving as SVG, it also expects a DPI independent size.

Also show DPI independent coordinates in the status bar.
2022-04-21 22:04:10 +02:00
Maarten Bent
e8cf1f989b Add ToDIP to wxDC and wxGraphicsContext 2022-04-21 22:04:10 +02:00
Maarten Bent
6637811f32 Fix saving bitmap with cairo renderer on macOS 2022-04-21 22:04:10 +02:00
Maarten Bent
e97926e555 Don't override wxUSE_DPI_AWARE_MANIFEST in resource file 2022-04-21 22:04:10 +02:00
Maarten Bent
7cd4e343a2 Let wxGCDC inherit wxWindow from wxGraphicsContext 2022-04-21 22:04:09 +02:00
Maarten Bent
59443803b4 Only scale MSW wxMemoryDC without window with content scale factor 2022-04-21 22:04:09 +02:00
Maarten Bent
5b5275c388 Make the printing sample DPI aware 2022-04-21 22:04:09 +02:00
Maarten Bent
1a1d19e93b Improve print preview and printing with high DPI
All print related scaling is based on 96DPI, so always let the printing contexts return this,
and also adjust the font to this DPI.
2022-04-21 22:04:06 +02:00
Maarten Bent
3da3103eb5 Override FromDIP in wxSVGFileDC and wxPostScriptDC
These are DPI independent.
2022-04-21 21:55:53 +02:00
Maarten Bent
cb05935f52 Check if GetDPI parameters are not NULL
And combine the same code for assigning the variables.
2022-04-21 21:55:53 +02:00
Maarten Bent
ef28ac392c Override GetDPI in wxMacCoreGraphicsContext
Let it return the DPI of the associated window, or (just like wxWindowMac::GetDPI)
return the DPI derived from the content scale factor.
2022-04-21 21:55:53 +02:00
Maarten Bent
93231968c7 Remove trailing whitespace in macOS graphics code 2022-04-21 21:55:52 +02:00
Maarten Bent
3587b3469f Make the polygon page in the drawing sample DPI aware
Remove unneeded wxGCDC constructor argument.

Make showing a clipping region, textured background, and changing
origin DPI aware.
2022-04-21 21:55:50 +02:00
Vadim Zeitlin
e38c8946d1 Merge branch 'dist-no-symlinks'
Get rid of symlinks in the distribution archives.

See #22342.
2022-04-21 21:25:22 +02:00
Vadim Zeitlin
ac60d78d8d Merge branch 'toolbar-bitmap-size'
Make wxToolBar::SetToolBitmapSize() take size in logical pixels.

See #22338.
2022-04-21 21:24:46 +02:00
PB
8c9c6f5088 Fix examples in wxBitmapBundle documentation
Add the missing label parameter to AddTool() calls.

Closes #22345.
2022-04-21 21:21:51 +02:00
Scott Talbert
be106d3fed Document missing wxEVT_FULLSCREEN 2022-04-20 22:54:06 -04:00
Vadim Zeitlin
f2425c5cbd Check that no symlinks are included in the distribution archives
They're not handled by the current 7z version under MSW if the user
doesn't have administrative rights and, instead of dealing with this,
it's simpler to just never include any symlinks in the archives as we
don't really need them anyhow.

So add a check ensuring that no symlinks are included in the
distribution archives to avoid more problems such as the one fixed in
the parent commit in the future.
2022-04-21 01:08:43 +02:00
Vadim Zeitlin
d10c4997ea Remove a useless symlink from expat submodule
This created problems when unpacking distribution archives without
administrative rights under MSW, so simply remove a symlink that we
don't really need anyhow to avoid them.

Closes #22271.
2022-04-21 01:08:43 +02:00
Vadim Zeitlin
1b3243c012 Merge branch 'zlib-1.2.12-prefix'
Fix bug with unprefixed functions in zlib 1.2.12.

See #22341.
2022-04-21 00:39:55 +02:00
Vadim Zeitlin
dbb9b9a651 Remove assert checking bitmap sizes in MSW wxHeaderCtrl
This assert could trigger when the window DPI was changed (e.g. due to
moving it to another display using different DPI scaling factor) and
doesn't seem very useful.

Just ensure that we always use the same size for all bitmaps in the
image list.

Closes #22267.

Closes #22334.
2022-04-20 23:38:42 +01:00
Maarten Bent
15a37b91fb Add FromDIP to wxDC and wxGraphicsContext
Using the same implementation as wxWindow has.
2022-04-20 20:37:53 +02:00
Maarten Bent
fda41cdd1b Remove GetDPIScaleFactor from wxDC and wxGraphicsContext
This reverts most of the changes from ee2b02614e (Add GetDPIScaleFactor to wxDC
and wxGraphicsContext, 2022-04-16).

This is not supposed to be used to scale pixels, FromDIP will be added instead.

Temporary use scale=1 in the drawing sample until FromDIP is added.
2022-04-20 20:33:29 +02:00
Maarten Bent
acc32082e8 Improve DPI support in wxMSW wxCairoRenderer
Drawing sample looks correct on Windows and Linux GTK3 at 200% scaling,
and correct DPI is returned.
2022-04-20 20:33:29 +02:00
Maarten Bent
afe2d55b3e Recreate DC buffer when content scale factor changes 2022-04-20 20:33:29 +02:00
Maarten Bent
a2ddfcf80b CMake: Fix warning when copying inplace config
Quote all parameters to ensure paths are handled properly.
2022-04-20 20:33:28 +02:00
Maarten Bent
24e20d80e3 CMake: Enable building with Cairo renderer on MSW without GTK 2022-04-20 20:33:18 +02:00
Vadim Zeitlin
079e608cb5 Remind to update zconf.h when upgrading zlib
And upgrade the submodule after performing the change documented here in
it to avoid link conflicts between the bundled zlib version and another
copy of zlib potentially used in the application due to the name clashes
between crc32_combine_xxx functions new in 1.2.12 that upstream forgot
to add to zconf.h.

Closes #22280.
2022-04-20 19:48:10 +02:00
Vadim Zeitlin
d8f346cecc Reorganize the 3rd party libraries update HOWTO more logically
Put steps in the chronological order.

Also put library-specific instructions in the same section, but in
different subsections instead of combining 2 of them in one section and
having a separate section for another one as before.
2022-04-20 19:43:49 +02:00
Vadim Zeitlin
1415830741 Fix section headings in 3rd party libraries upgrading HOWTO
Using numbers prevented the headings from being interpreted as such and
we instead got numbered item followed by a horizontal separator when
rendering Markdown as HTML.

Just remove the numbers to fix this.
2022-04-20 19:34:03 +02:00
catalinr
7e9a847c22 Update Romanian translations
Closes #22339.
2022-04-20 01:49:22 +02:00
Vadim Zeitlin
eb6506e677 Make wxToolBar::SetToolBitmapSize() take size in logical pixels
Previously it interpreted its argument as being in DIPs, which was
perhaps more convenient, but inconsistent with most of the other
functions and broke the general rule that FromDIP() should be used with
all hard-coded sizes.

Update the sample to use FromDIP() when calling it now, improve the
documentation and fix a bug in AdjustToolBitmapSize() which resulted in
not increasing the bitmap size when moving toolbar sample using "large"
toolbar size from a standard DPI display to a high DPI one: the old code
considered that the new size was the same as the old one and returned
before comparing it with m_requestedBitmapSize, which resulted in the
bitmaps not changing size at all instead of doubling their size as they
were expected to.
2022-04-19 23:36:02 +01:00
Vadim Zeitlin
a0abd711f7 Remove outdated comment from wxToolBarBase code
This comment was for the line of code removed back in 222ed1d678
(STL-ification patch for wxMSW and wxGTK., 2003-07-10) and should have
itself been removed back then, as it didn't make any sense after it.

No real changes.
2022-04-19 18:51:29 +01:00
Scott Talbert
6fa4e1b912 Fix wxWebViewFactory::GetVersionInfo documentation 2022-04-18 23:25:13 -04:00
Scott Talbert
cfbf667513 Fix wxMenuItem::AddExtraAccel documentation 2022-04-18 22:36:55 -04:00
Vadim Zeitlin
1d699256b5 Merge branch 'readme-win11'
Add Windows 11 to supported platforms listed in various documentation
files.

See #22331.
2022-04-19 00:53:34 +02:00
Vadim Zeitlin
a473a5746a Add Windows 11 to support MSW versions in the documentation
Update (hopefully all) the other enumerations of MSW versions to include
Windows 11 too.
2022-04-19 00:52:40 +02:00