And use it to get HiDPI support wherever we use GtkImage. This extends and
consolidates support for custom drawing of images which has already been added
somewhat redundantly in several places.
We should use platform-specific functions to convert coordinates to take
into account all transformations applied to wxDC (also with transform
matrix).
Closes#18916.
Generic wxDC::DeviceToLogical{X|Y}() and wxDC::LogicalToDevice{X|Y}()
functions don't take into account transformations applied with
wxDC::SetTransformMatrix() so conversion results are invalid if wxDC is
transformed with both e.g. wxDC::SetUserScale() and
wxDC::SetTransformMatrix().
We need to implement functions in wxDCImpl and its platform-specific
derivates to do this conversion with taking into account all applied
transformations.
See #18916.
1) Link with the wayland-egl library, but do so only if we determine that we
have Wayland support in the GDK backend with a compile test.
2) Provide a way to force disable the EGL backend.
* adding native font descriptor serialization = v2
* remove common xml prefix from serialized string
* Update src/osx/carbon/font.cpp
Co-authored-by: VZ <vz-github@zeitlins.org>
* Update src/osx/carbon/font.cpp
Co-authored-by: VZ <vz-github@zeitlins.org>
* static string via accessor
* striping off xml preamble unconditionally
if we use a different format in the future, we will have to increase our version number
* applying italic directly to the font descriptor
thus preserving attributes in the native font descriptor which we don’t store explicitly yet
* Adding support for preserving font width
Although we don’t express this in the public API yet, we try to preserve eg condensed, when changing the font width
* Adding reference, bug fix
double checked the font weight constants,
Co-authored-by: VZ <vz-github@zeitlins.org>
This fixes another problem similar to the one fixed in be1854c617 (Avoid
UI functions in non-main thread in wxGStreamerMediaBackend, 2020-09-02)
and does it in a similar way: SetupXOverlay(), which calls gdk_flush(),
was called from gst_bus_sync_callback() which is executed in the worker
thread, so use CallAfter() to call it from the main thread later.
In aa2cd42206 (Report video size changes to the media backend,
2016-02-22), a couple of calls to NotifyMovieSizeChanged() were added,
presumably for a good reason. Unfortunately, NotifySizeChanged() makes
UI calls on wxGTK, so this resulted in UI calls happening on a non-main
thread because many of GStreamer's callbacks occur on arbitrary threads.
This is bad because it caused random X11 crashes.
Fix this by calling NotifyMovieSizeChanged() with CallAfter().
Closes https://github.com/wxWidgets/wxWidgets/pull/2042
Draw wxTextCtrl focus ring natively on Mac.
Add wxWindow::EnableVisibleFocus() to explicitly control the focus ring
visibility if necessary.
See https://github.com/wxWidgets/wxWidgets/pull/2037
Although @"UIApplication" is supposed to be used by default anyhow,
passing "nil" is reported to result in an assertion failure in
'_UIApplicationGetPrincipalClass' when running under the iOS 13.1
simulator, so pass this string explicitly.
Closes https://github.com/wxWidgets/wxWidgets/pull/2035
Check compilation of all wx headers with all gcc warnings enabled.
This should make it impossible to introduce problems that only appear
when -Wpedantic or -Wany-other-not-completely-unreasonable-warning is
enabled when building user code including wx headers again.
See https://github.com/wxWidgets/wxWidgets/pull/2033
Fix name of wxrc executable when cross-compiling from Unix.
Note that the Makefile hasn't been rebaked after the changes of
f3bd129568 (Append WX_FLAVOUR to the name of wxrc executable,
2020-08-06), so this commit reflects the changes to wxrc.bkl from both
that commit and this one.
Closes https://github.com/wxWidgets/wxWidgets/pull/2041
Avoid calling GeTDPI() in font.WXAdjustToPPI(GetDPI()); invocations in
common code on platforms that don't need any adjustment (i.e. anything
other than MSW).
This fixes wxOSX crashes when GetFont() is called too early during
window creation, but is the right thing to do regardless.
Closes https://github.com/wxWidgets/wxWidgets/pull/2036Closes#18903.
We don't use "final" in our code, as very few classes in wx code have
virtual functions but are not meant to be derived from in the user code.
Ideal would be to check the existing warnings and maybe apply "final" if
it's relevant and disable it otherwise, as these warnings can be useful
to build the application code with, but for now just disable them in the
test suite.
The error message
wx/string.h:558:47: error: missed loop optimization, the loop counter may overflow
[-Werror=unsafe-loop-optimizations]
for ( Cache::Element *c = cacheBegin; c != cacheEnd; c++ )
~~^~~~~~~~~~~
doesn't seem to really make much sense, as it shouldn't overflow here.