Commit Graph

69160 Commits

Author SHA1 Message Date
Vadim Zeitlin
44c2671e7b Add initial draft of high DPI overview
Add a topic covering high DPI support.
2020-09-21 02:15:08 +02:00
Vadim Zeitlin
50fc4eb1f3 Work around spurious Travis CI failures in WebView selection test
We can't rely on HasSelection() returning true immediately after calling
SelectAll() because this operation (as almost all the other ones) is
asynchronous with WebKit and might not have completed yet when we check
for the selection existence.

There doesn't seem to be any way to wait for its completion, so just
poll the selection state for some time before deciding that it hasn't
been updated. In practice, just a couple of ms is enough on a normal
machine, but wait up to 50ms on Travis just to be on the safe side.

Note that to reliably reproduce the problem locally it's enough to run
"taskset 1 ./test_gui -c Selection WebView", i.e. pin both the main and
WebKit processes to the same CPU.
2020-09-20 23:19:09 +02:00
PB
198635ad68 Fix linking issue with wxCmpNatural() in static build
wxCmpNatural() had "inline" function specifier in a .cpp file
which made the function inaccessible outside that file in static builds.

Fix this by removing "inline", the function character is such that the
overhead by a function call should have negligible impact on its
performance.

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

Closes #18919.
2020-09-20 18:21:23 +02:00
Vadim Zeitlin
43249151dd Merge branch 'aui-no-tooltips'
Hide tooltips when style wxAUI_TB_NO_TOOLTIPS is set.

See https://github.com/wxWidgets/wxWidgets/pull/2048
2020-09-20 18:19:30 +02:00
Vadim Zeitlin
466f72a16c Avoid claling FindToolByPositionWithPacking() needlessly
This is a micro-optimization after the previous commit: don't call
FindToolByPositionWithPacking() at all rather than calling it and then
ignoring its result if wxAUI_TB_NO_TOOLTIPS style is set.

This commit is best viewed ignoring whitespace.
2020-09-20 18:18:36 +02:00
Vadim Zeitlin
9abe63333d Merge branch 'im/docadditions' of https://github.com/imciner2/wxWidgets
Various documentation fixes and improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2047
2020-09-20 18:14:02 +02:00
Paul Cornett
7d11dd20d4 Replace some floating point expressions with equivalent integer ones 2020-09-18 12:10:40 -07:00
Paul Cornett
7298070ab0 Avoid formatting integers as floating point 2020-09-18 10:57:23 -07:00
Paul Cornett
1912528acb Avoid formatting literal zeros as floating point 2020-09-18 10:53:14 -07:00
Paul Cornett
9c7b340d83 Don't override user-supplied CPPFLAGS
Ordering matters for include directives, so add to the end, not the front.
2020-09-18 10:08:24 -07:00
Paul Cornett
5b719394fe Add library CFLAGS to CXXFLAGS, not CPPFLAGS 2020-09-18 10:02:05 -07:00
Paul Cornett
a8fc92d020 Add -ldl library if needed for dladdr()
It's possible for the dlopen() check to succeed without -ldl, but the dladdr()
check fails without it. This happens with GCC's -fsanitize=address.
2020-09-18 09:52:30 -07:00
Artur Wieczorek
52631b3368 Use dedicated CRT function to round the value for MSVS 2015+
round() is available since at least VS 2015. It is not available in
VS 2010. VS 2012 and 13 need to be checked.
2020-09-18 11:24:13 +02:00
Paul Cornett
dcdcbbe078 Fix wxDataViewCheckIconTextRenderer icon size with GTK3 2020-09-17 09:29:30 -07:00
Artur Wieczorek
32cc9317f2 Use dedicated CRT function to round the value with MSVC 2020-09-17 13:46:53 +02:00
Artur Wieczorek
4b491c19a2 Implement wxRound() with dedicated C++11 standard library function 2020-09-17 13:45:57 +02:00
Artur Wieczorek
864034bddc Get rid of redundant return statement 2020-09-17 13:44:30 +02:00
Artur Wieczorek
4b10b4f5e2 Use dedicated function to round values 2020-09-17 13:44:15 +02:00
Jouk
5274d2d647 Add src/gtk/image_gtk.cpp for compilation in OpenVMS makefile 2020-09-17 09:37:12 +02:00
Paul Cornett
b376d1402b Add support for HiDPI bitmaps to wxDataViewBitmapRenderer with GTK3 2020-09-16 11:33:13 -07:00
Paul Cornett
85d63c3150 Add a class derived from GtkImage to support HiDPI bitmaps
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.
2020-09-15 11:52:03 -07:00
Ian McInerney
cb04c35365 OSX: Fixes for readonly text fields (#2049) 2020-09-15 08:21:47 +02:00
Ian McInerney
932b9ca62f Hide tooltips when style wxAUI_TB_NO_TOOLTIPS is provided 2020-09-14 21:49:43 +01:00
Ian McInerney
d33a393ed8 Docs: Remove wxTB_FLAT from the default style
This style was removed from the default previously,
so this was just a remnant in the documentation.

Fixes #17542
2020-09-14 21:46:41 +01:00
Ian McInerney
5e73cf3612 Document styles for the AUI toolbar 2020-09-14 21:41:56 +01:00
Artur Wieczorek
e88f248e3a Fix calculating bounding box
We should use platform-specific functions to convert coordinates to take
into account all transformations applied to wxDC (also with transform
matrix).

Closes #18916.
2020-09-13 23:54:16 +02:00
Artur Wieczorek
014bd2ae54 Implement platform-specific coordinate conversion functions
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.
2020-09-13 23:47:26 +02:00
Paul Cornett
4ebfe0059a Pre-include another header for Cygwin
Avoid -Wpedantic warning for extra ';'
2020-09-13 08:27:45 -07:00
Scott Talbert
35f2fd4be7 Fix linking issues with wxGLCanvasEGL for cmake
1) Link with EGL and wayland-egl libraries (with check for GDK Wayland).
2) Provide a way to force disable the EGL backend.
2020-09-12 15:54:15 -07:00
Scott Talbert
c315359c72 Fix linking issues with wxGLCanvasEGL for autoconf
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.
2020-09-12 15:54:15 -07:00
Stefan Csomor
bc9e7b71e7 macOS wxNativeFontInfo changes (#2045)
* 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>
2020-09-12 19:29:26 +02:00
Robin Dunn
16ab09208f Add missing dock art Clone methods 2020-09-10 12:39:05 -07:00
Ian McInerney
b4a50b1ea7 Document return types in wxAuiToolBarItem better
These functions return only specific flags inside an integer,
so in order to use the functions we need to know the flags.

Fixes #14972
2020-09-04 18:25:41 +01:00
Ian McInerney
55f80941bf Mention that wxFD_OVERWRITE_PROMPT is always enabled on OSX
This style is ignored on OSX because there is no way to disable
the overwrite prompt from showing.

Fixes #13541
2020-09-04 18:25:41 +01:00
Vadim Zeitlin
c2b1dbda83 Call GDK functions from main thread in wxGStreamerMediaBackend
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.
2020-09-02 23:24:05 +02:00
Vadim Zeitlin
e4333fdeac Fix recurrent typo in "usable"
This word has a single "e".
2020-09-02 20:49:39 +02:00
Vadim Zeitlin
bf71a70a12 Merge branch 'updateui-ischeckable'
Add a flag to wxUpdateUIEvent to tell if the item supports the check
action.

See https://github.com/wxWidgets/wxWidgets/pull/2027
2020-09-02 19:34:05 +02:00
Vadim Zeitlin
7be693212c Improve documentation of wxUpdateUIEvent::IsCheckable()
Explain when this method can be useful.
2020-09-02 19:33:39 +02:00
Vadim Zeitlin
1db3751235 Merge branch 'macos11-preferences' of https://github.com/vslavik/wxWidgets
Update wxPreferencesEditor to add support for macOS 11.

See https://github.com/wxWidgets/wxWidgets/pull/2040
2020-09-02 19:26:41 +02:00
Vadim Zeitlin
eb8c48a481 Merge branch 'macos11-fix-ui-fonts-handling' of https://github.com/vslavik/wxWidgets
Fix system UI font handling on macOS 11.

See https://github.com/wxWidgets/wxWidgets/pull/2034
2020-09-02 19:24:26 +02:00
Scott Talbert
be1854c617 Avoid UI functions in non-main thread in wxGStreamerMediaBackend
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
2020-09-02 19:22:46 +02:00
Jouk
1ce2ab5d49 Add definition of wxUSE_GLCANVAS_EGL 2020-09-02 07:46:25 +02:00
Paul Cornett
05a134d985 Build fix for GDK_WINDOWING_WAYLAND not defined
Add some missing GDK_WINDOWING_WAYLAND wrappers.
Also some minor changes to includes.
2020-09-01 08:14:58 -07:00
Vadim Zeitlin
5dd3b733bd Test building without 3.0 compatibility on Travis CI too
This will test errors like the one fixed by the previous commit by
testing that samples and tests still build without 3.0 API.
2020-09-01 15:07:31 +02:00
Vadim Zeitlin
0a053580c0 Use wxEVT_GRID_RANGE_SELECTED instead of deprecated SELECT
Fix building the tests with WXWIN_COMPATIBILITY_3_0 disabled.
2020-09-01 15:04:39 +02:00
Scott Talbert
7cd12a2bd6 Add EGL-based backend for wxGLCanvas
Among other things, this enables wxGLCanvas to be used natively on
Wayland.

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

Closes #17702.
2020-09-01 15:03:30 +02:00
Vadim Zeitlin
ed4b9e5f97 Merge branch 'mac-native-focus-ring' of https://github.com/vslavik/wxWidgets
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
2020-09-01 14:59:42 +02:00
Rob McKay
94e8129f3f Explicitly specify application class in wxiOS
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
2020-09-01 14:57:29 +02:00
Vadim Zeitlin
b9f946fcd3 Merge branch 'check-headers-max-warn'
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
2020-08-31 15:10:16 +02:00
Arrigo Marchiori
629c4aac97 Add EXEEXT to the wxrc versioned executable
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
2020-08-31 14:59:39 +02:00