Commit Graph

72444 Commits

Author SHA1 Message Date
Maarten Bent
bf4e45fc67 Fix Cairo DPI when no wxWindow is associated
Always multiply with the content scale factor, also on macOS.
2022-04-24 18:47:50 +02:00
Maarten Bent
deaa43e32d CMake: Remove workaround for removing png headers from cairo
CAIRO_INCLUDE_DIRS does not include them with the current FindCairo.cmake.
2022-04-24 18:47:43 +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
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
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
Uwe Runtemund
13339425be Fix setting wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_TOP_COLOUR
wxRibbonMSWArtProvider::SetColour() used a wrong variable for this
colour index, assign to the correct one.

Closes #22321.
2022-04-19 00:48:11 +02:00
Uwe Runtemund
94f698cc15 Add functions for getting current ribbon tool rectangle
wxRibbonButtonBar::GetItemRect() and wxRibbonToolBar::GetActiveTool()
are helpful for positioning other windows (e.g. popup ones) that should
be aligned to tools and buttons in the ribbon bar.

Closes #22329.
2022-04-19 00:46:58 +02:00
Vadim Zeitlin
692073ea7d Merge branch 'fix_lc_removesortindicator_doc' of https://github.com/swt2c/wxWidgets
Fix a couple of wrong signatures in the documentation.

See #22326.
2022-04-19 00:40:40 +02:00
Vadim Zeitlin
bf3b653492 Merge branch 'auibook-help'
Fix infinite recursion when processing wxEVT_HELP for wxAuiNotebook
pages.

See #22323.

Closes #22309.
2022-04-19 00:38:39 +02:00
Vadim Zeitlin
3439087685 Merge branch 'fontdlg-dpi'
Fix font sizes in MSW font dialog in high DPI.

See #22322.
2022-04-19 00:35:20 +02:00
Vadim Zeitlin
c65c0e44f3 Remove duplicated configure call from Mac CI workflow
This seems to have been accidentally added in 6afd2e8f87 (Revert "making
sure CI builds don’t contaminated checked out directory on self-hosted
runner", 2022-04-17).
2022-04-19 00:33:33 +02:00
Stefan Csomor
db49f840ab Add GitHub Actions workflow for CI builds using Xcode
Also update the file used for Xcode builds to make them actually
succeed.

See #22321.
2022-04-19 00:31:07 +02:00
Vadim Zeitlin
4d163de84e Merge branch 'dc-content-scale-factor'
Add GetDPIScaleFactor() to wxDC and wxGraphicsContext to allow scaling
the coordinates and sizes depending on the DPI.

See #22314.
2022-04-19 00:28:09 +02:00
Vadim Zeitlin
e3bf5d6845 Document wxDC::GetContentScaleFactor() too
This function existed since a long time but somehow was never
documented.

Also minor improvements to the just added documentation of
wxDC::GetDPIScaleFactor().
2022-04-19 00:27:23 +02:00
PB
7d73617b33 Add Windows 11 to supported platforms listed in README.md 2022-04-18 22:19:57 +02:00
Artur Wieczorek
b06b950574 Document changes in wxImageFileProperty
Remove references to the non-public member variables
from documentation.
2022-04-18 22:17:31 +02:00
Vadim Zeitlin
87a0472485 Fix size of the font returned from wxFontDialog in wxMSW
Ensure that the font has exactly the point size entered in the dialog,
rather than having a fractional point size close, but not identical, to
it, as happened before due to first rounding the result of converting
the point size to pixels and then _not_ rounding the result of the
reverse conversion.

This resulted in wxFont::GetPointSize() returning the correct value, but
not GetFractionalPointSize(). Now the latter returns the same, correctly
rounded, value too.
2022-04-18 19:03:03 +01:00
Vadim Zeitlin
91f1be23dd Fix initial point size in MSW wxFontDialog in high DPI
The native dialog doesn't take the actual DPI into account, so convert
our font sizes that do use the DPI to the standard one before using it
and convert font height back to the value corresponding to the actual
DPI once a font is selected in it.

Closes #22313.
2022-04-18 19:02:38 +01:00
Stefan Csomor
7fc2024f0e support required compilation failure for comboboxtest on platforms with wxUSE_COMBOBOX==0 2022-04-18 19:29:45 +02:00
Stefan Csomor
e5827d0ae9 using proper bash defaults
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
2022-04-18 17:37:03 +02:00
Vadim Zeitlin
02434dcc1f Workaround a crash with MSYS2 gcc 9.1 again
The changes of 2144ca38d2 (Get rid of CppUnit boilerplate in
DynamicLibraryTestCase, 2022-04-17) accidentally undid the workaround
from 054cb35b39 (Workaround for a crash with gcc 9.1 from MSYS2 MinGW
32bit, 2019-08-03), so work around the same problem again by avoiding
using CHECK() with function pointers.
2022-04-18 14:36:52 +02:00
Vadim Zeitlin
61e24f6be0 Give more information if wxFont unit tests fail
Use INFO() to provide extra information instead of the ugly
WX_ASSERT_MESSAGE().
2022-04-18 14:29:53 +02:00
Scott Talbert
19d3e2d902 Fix wxIcon::GetLogicalSize documentation 2022-04-17 23:41:46 -04:00
Scott Talbert
7a98e93bb4 Fix wxListCtrl::RemoveSortIndicator documentation 2022-04-17 22:27:29 -04:00
Stefan Csomor
6afd2e8f87 Revert "making sure CI builds don’t contaminated checked out directory on self-hosted runner"
This reverts commit 88bd6d0135. we’re trying to use this approach: https://docs.github.com/en/actions/hosting-your-own-runners/running-scripts-before-or-after-a-job
2022-04-17 23:33:50 +02:00
Stefan Csomor
88bd6d0135 making sure CI builds don’t contaminated checked out directory on self-hosted runner
self-hosted runners are stateful - surprise - so we have to isolate things better
2022-04-17 20:47:54 +02:00
Vadim Zeitlin
b66d4488e1 Merge branch 'fn-long-path'
Fix wxPATH_NORM_LONG with UNC paths and slightly optimize long path
normalization.

See #22307.
2022-04-17 18:51:09 +02:00
Vadim Zeitlin
6998eaf154 Merge branches 'no-unused-err' and 'dynlib-test-fix'
Fix CI builds under macOS 12 with clang 13.
2022-04-17 18:49:52 +02:00
Vadim Zeitlin
26e35e0170 Use port free even under macOS 12 port for running httpbin
The default httpbin listening port 5000 is used by Monterrey (macOS 12)
Control Center for its own needs, so use another port to avoid conflicts
with it and the resulting failures when running wxWebRequest unit tests
under this macOS version.
2022-04-17 18:48:12 +02:00
Vadim Zeitlin
2144ca38d2 Get rid of CppUnit boilerplate in DynamicLibraryTestCase
Use CATCH macros directly, this is simpler and more clear.

Also use narrow strings instead of wide ones and get rid of wxT() too.

No real changes.

This commit is best viewed ignoring whitespace-only changes.
2022-04-17 18:44:51 +02:00
Vadim Zeitlin
f3b4ee3b5f Skip dynamic library file existence check under Darwin
Under Monterrey (macOS 10.12) we can actually load the file using
wxDynamicLibrary even though it does _not_ exist on the disk, so don't
skip the test just because of this.
2022-04-17 18:38:08 +02:00
Vadim Zeitlin
c6b3b4a39c Make the warning in DynamicLibraryTestCase actually visible
Using wxLogWarning() doesn't work as logs are suppressed by default, but
using CATCH WARN() macro does work.
2022-04-17 18:35:34 +02:00