Commit Graph

69231 Commits

Author SHA1 Message Date
Artur Wieczorek
3d469f3234 Draw shape mask with antialiasing disabled
We need really B/W bitmap to create a mask so antialising should be disabled
in case.
2020-08-08 21:52:13 +02:00
Stefan Brüns
3f9531fe31 Use local static variable for ArtID mapping table
The instantiation of the global static mapping table may happen before
the instantiation of the wxArtIds, i.e. the copy-constructor would
access not yet valid wxArtId/wxString instances.

Delay the instantiation until the first call to wxArtIDToStock call.
This is still not 100% safe, as wxArtIDToStock may be called by a
constructor of a static instance, but hopefully nobody does that.
2020-08-08 12:44:48 +02:00
Vadim Zeitlin
884d2ffd32 Merge branch 'misc-fixes' of https://github.com/MaartenBent/wxWidgets
Enable using PIC by default even for static libraries and several other
build-related fixes (warning fixes etc).

See https://github.com/wxWidgets/wxWidgets/pull/2008
2020-08-08 02:01:06 +02:00
Vadim Zeitlin
f71fbd93b7 Correct documentation of wxUSE_UNICODE-related settings
wxUSE_UNICODE_UTF8 is not default anywhere since a long time.

Also mention that wxUSE_UNICODE==0 build is already deprecated and will
be dropped in the future.
2020-08-07 13:34:46 +02:00
Maarten Bent
4ee04daa7c Enable position independent code by default
Add a build option (--disable-pic, wxBUILD_PIC=OFF) to disable it.

Note that it is always enabled for shared libraries and static third party libraries.
2020-08-06 21:43:41 +02:00
Arrigo Marchiori
f3bd129568 Append WX_FLAVOUR to the name of wxrc executable 2020-08-06 14:03:26 +02:00
Stefan Brüns
128e3ff123 Make the wxART_* constants const wxStrings with static storage duration
The pre-3.1.4 definitions of the constants were just string literals,
while the type were wxString typedefs. To avoid implicit conversion
these were converted to actual wxStrings.

While the interface now matched the implementation, this has several
drawbacks:
- every use of the "constant" now is a string construction at runtime
- the constant now is an rvalue, i.e. it is impossible to take its
  address.

The latter breaks its use from wxPython.

The IDs are moved to a separate file which can be included multiple
times, once from the header to have the declarations in place, and once
to instantiate the wxStrings. Using a common file avoids the declaration
and definition going out of sync.
2020-08-06 12:31:37 +02:00
ali kettab
2256dac384 Enable wxSlider "Thumb" unit test under GTK too
This was disabled, but only didn't work because wxSlider used tiny size
in wxGTK by default previously. After correcting this in aa2d159e8c (Use
more reasonable length for wxSlider in wxGTK by default, 2020-08-04),
the unit test passes with wxGTK too and can be reenabled.

Closes https://github.com/wxWidgets/wxWidgets/pull/1992
2020-08-05 22:46:04 +02:00
Vadim Zeitlin
aa2d159e8c Use more reasonable length for wxSlider in wxGTK by default
Use the same 100 DIPs as in wxMSW, to make the default behaviour more
useful.

Also update documentation to explain which size component should, and
should not, be specified when creating the slider.

Closes https://github.com/wxWidgets/wxWidgets/pull/2012
2020-08-05 00:01:50 +02:00
Hertatijanto Hartono
c695c419d1 Utilise GetZoomFactor() in webview sample
Show example of using GetZoomFactor().

Closes https://github.com/wxWidgets/wxWidgets/pull/1999
2020-08-03 23:58:19 +02:00
Maarten Bent
3328480f78 CMake: use set_target_properties() instead of set_property(TARGET ) 2020-08-03 21:35:13 +02:00
Maarten Bent
6327ab4e5e CMake: link with javascriptcoregtk-4.0 when building static library 2020-08-03 21:35:13 +02:00
Maarten Bent
c2a7e6c946 Fix unused-variable warning in wxListCtrl code 2020-08-03 21:35:13 +02:00
Maarten Bent
5bd35f6c85 Fix unused-function warning in wxSockAddressImpl code 2020-08-03 21:34:45 +02:00
Maarten Bent
81a5efb6ab Fix implicit-int-float-conversion warning in bombs demo 2020-08-03 21:34:45 +02:00
Maarten Bent
3c368408fb CMake: use dedicated function to check function availability 2020-08-03 21:34:44 +02:00
Maarten Bent
cc12eafc34 CMake: fix name clash between folder and application
The test_gui project copies some resource files into image and drawing folders,
so don't use the same name for the sample applications.
2020-08-03 21:33:37 +02:00
Maarten Bent
f25a88a13d CMake: allow to use build-in libraries on Linux
Requires updates of expat and tiff submodules.

Most libraries have their own CMakeLists, add a comment with a suggestion to
use this for implementing build-in support.
2020-08-03 21:33:37 +02:00
Maarten Bent
4cab673556 Make sure generated wxSTC files have LF EOL
Use 'wb' with Python 2 to enforce LF newlines. This does not work with
Python 3, use 'newline':'\n' there (which in turn does not work with 2).
2020-08-03 21:33:33 +02:00
Maarten Bent
755afd9d1b Fix typos in wxSTC interface 2020-08-03 21:32:52 +02:00
Paul Cornett
b1729ed8a0 Improve our estimate of wxNotebook page size with GTK 2020-08-03 10:36:38 -07:00
Maarten Bent
590e32c60b Fix building with wxUSE_STL enabled in VS2019 16.6
Exporting standard C++ library types is not allowed any more, see

https://developercommunity.visualstudio.com/content/problem/1042081/142628801includexhash201332-error-c2338-this-funct.html

so don't use DLL export declarations for wxHash{Map,Set} classes, which
derive from std::{map,set}.

Since the classes are header-only, this should have no direct
consequences. Only classes that extend wxHashMap or wxHashSet, like
wxImageHistogram, have to be made header only as well.

Remove the wxLogError message in wxImageHistogram::FindFirstUnusedColour, so
log.h and translation.h do not have to be included in the header.

Closes https://github.com/wxWidgets/wxWidgets/pull/2009
2020-08-03 12:54:35 +02:00
Vadim Zeitlin
5aa1f4e953 Merge branch 'dpi-colour' of https://github.com/MaartenBent/wxWidgets
Make wxGenericColourButton and wxGenericColourDialog DPI aware.

See https://github.com/wxWidgets/wxWidgets/pull/2006
2020-08-03 00:49:56 +02:00
Vadim Zeitlin
c1c74c9ea5 Merge branch 'dpi-manifest-gui' of https://github.com/MaartenBent/wxWidgets
Only embed manifest in GUI applications (and not the libraries
themselves or console utilities, tests and samples).

See https://github.com/wxWidgets/wxWidgets/pull/2003
2020-08-03 00:45:15 +02:00
Vadim Zeitlin
f19b3f6586 Merge branch 'test-test' of https://github.com/AliKet/wxWidgets
Minor cleanups for the tests.

See https://github.com/wxWidgets/wxWidgets/pull/1998
2020-08-03 00:26:43 +02:00
Paul Cornett
bd835ee452 Fix a sizing/layout problem with GTK3
Relying on "check-resize" to detect when a "size-allocate" is in progess is
insufficient, resulting in the possibility of a window ending up with the wrong
size or position after inital layout. Using our existing "size-allocate"
handlers should be enough to detect the cases we care about.
See #18865
2020-08-01 21:23:34 -07:00
Maarten Bent
b10ba803f5 Make wxGenericColourDialog DPI aware 2020-07-31 22:25:10 +02:00
Maarten Bent
9e2615ac06 Move creating custom bitmaps of wxGenericColourDialog into separate function 2020-07-31 22:25:08 +02:00
Maarten Bent
a54b4073f9 Remove unused members from wxGenericColourDialog 2020-07-31 22:25:04 +02:00
Maarten Bent
4f09f83597 Make wxGenericColourButton DPI aware 2020-07-31 22:25:02 +02:00
Maarten Bent
53a2c8c7fb Rebake after manifest changes 2020-07-31 01:53:43 +02:00
Maarten Bent
40724c4963 Only embed manifest in GUI applications 2020-07-31 01:53:40 +02:00
Maarten Bent
785c448870 Fix checking size of security URL in wxWebviewIE
Allows to utilize the entire buffer when necessary.
2020-07-28 21:22:21 +02:00
Maarten Bent
43f84a9c18 Use security URL from wxWebViewHandler in wxWebViewIE
Don't use hard-coded 'http://localhost', but use the URL specified in the
wxWebViewHandler.

By default, the security URL is empty and no modifications are made when
parsing a URL. This fixes using JavaScript in pages loaded with a custom
protocol, e.g. from wxWebViewFSHandler or wxWebViewArchiveHandler.

Closes #17893
2020-07-28 21:22:21 +02:00
Maarten Bent
300fe1a6f9 Add option to wxWebViewHandler to set a custom security URL
This will be used by wxWebViewIE to modify the security URL and domain when
parsing a URL.
2020-07-28 21:22:21 +02:00
Maarten Bent
bcadef5e2c Remove obsolete VirtualProtocol IID table
The IIDs are now checked inside VirtualProtocol::QueryInterface.
2020-07-28 21:19:28 +02:00
Maarten Bent
0885057b70 Fix typo in wxWebViewIE failure message 2020-07-28 21:19:28 +02:00
Maarten Bent
dc585039bb CMake: copy resources required for webview sample 2020-07-28 21:19:25 +02:00
Paul Cornett
5e89d575c3 Correction for previous change to wxBitmap scaling in Blit()
Destination wxMemoryDC context is already scaled
2020-07-28 11:35:53 -07:00
Paul Cornett
2b9499d7a7 Preserve wxBitmap scaling in Blit() with wxMemoryDC on GTK3
See #18857
2020-07-28 00:03:15 -07:00
Stefan Csomor
8df97af5fe detailing requirements for macOS a little more 2020-07-26 22:17:15 +02:00
Stefan Csomor
bb40699675 macOS bugfix: overrelease in wxGetAvailableDrives
as these strings are NSStrings retrieved by autoreleasing methods, they must be retained first
2020-07-26 11:37:55 +02:00
ali kettab
30e5ff87a4 the assertion was mistakenly placed in the wrong place 2020-07-25 18:09:55 +01:00
ali kettab
b1c83920b5 fix typo 2020-07-25 16:09:50 +01:00
ali kettab
ad68515d52 cleanup a wxTextCtrl leftover from SpinCtrlTest 2020-07-25 14:59:31 +01:00
ali kettab
852f817291 Get rid of redundant call to wxDELETE (no real change) 2020-07-25 12:34:25 +01:00
ali kettab
247ee328b3 remove workaround from BitmapComboBoxTestCase 2020-07-25 12:14:42 +01:00
Vadim Zeitlin
a1774fcc4e Merge branch 'cmake-header-test-and-warnings' of https://github.com/MaartenBent/wxWidgets
Add test for headers compilation with wxNO_IMPLICIT_WXSTRING_ENCODING to
CMake and a couple of warning fixes.

See https://github.com/wxWidgets/wxWidgets/pull/1993
2020-07-24 14:13:56 +02:00
Vadim Zeitlin
3ebed58d1a Merge branch 'webview_test_skip' of https://github.com/swt2c/wxWidgets
Skip tests not working for WebKit 2 and re-enable web view in Travis CI
wxGTK3 build.

See https://github.com/wxWidgets/wxWidgets/pull/1994
2020-07-24 14:11:17 +02:00
Scott Talbert
64b7406ede Re-enable webview on GTK3 Travis build 2020-07-23 21:52:45 -04:00