Commit Graph

70478 Commits

Author SHA1 Message Date
Artur Wieczorek
2af825c6a6 Fix setting image margin in wxButton (wxMSW)
When button images are stored in the image list (BUTTON_IMAGELIST)
their margins should be set with BCM_SETIMAGELIST message.
BCM_SETTEXTMARGIN sets the margins around the text label
and not the image.

See #13130.
2021-03-13 22:50:33 +01:00
Vadim Zeitlin
f6194cb797 Merge branch 'config-size_t'
Add support for 64-bit numbers and size_t to wxConfig.

See https://github.com/wxWidgets/wxWidgets/pull/2272
2021-03-13 22:35:01 +01:00
Václav Slavík
aa2a291891 Support underline and strikethrough in wxMarkupToAttrString
Honor wxFont's strikethrough and underline attributes when converting
label markup to NSAttributedString. On macOS, strikethrough and
underline are properties of (rich) text, not of fonts, so a conversion
like this is necessary.
2021-03-13 19:38:16 +01:00
Vadim Zeitlin
e667071416 Compile wxConfig unit tests as part of non-GUI test too
Almost none of the tests require GUI, so make it possible to run them
without it, but still include the GUI tests when using GUI.
2021-03-13 15:15:40 +01:00
Vadim Zeitlin
0c837e5310 Add support for size_t to wxConfig
Allow writing and reading size_t values directly too, there were not
previously accepted unlike all the other arithmetic types.

Closes #19091.
2021-03-13 15:15:37 +01:00
Vadim Zeitlin
fce8780297 Add 64-bit integers support to wxConfig
Serialize them to strings in wxFileConfig, just as we always did for
long, but use wxRegKey support for storing them directly to the registry
in wxRegConfig.
2021-03-13 15:14:58 +01:00
Vadim Zeitlin
12d191823a Merge branch 'stc-typo-fixes'
Fix minor typos in STC docs.

See https://github.com/wxWidgets/wxWidgets/pull/2276
2021-03-13 13:35:28 +01:00
Vadim Zeitlin
5a623d3a4e Regenerate STC files after the typo fixes
Rerun src/stc/gen_iface.py.
2021-03-13 13:35:14 +01:00
Blake Madden
1b701bf340 Fix my incorrect wording. 2021-03-13 07:30:10 -05:00
Vadim Zeitlin
38f8c200dd Merge branch 'stc-simplify-width' of https://github.com/MaartenBent/wxWidgets
Remove some recently added unneeded code for wxSTC auto-complete listbox
(see https://github.com/wxWidgets/wxWidgets/pull/2250).

See https://github.com/wxWidgets/wxWidgets/pull/2277
2021-03-13 13:28:28 +01:00
Vadim Zeitlin
c88f23db3e Merge branch 'doc_misc' of https://github.com/TcT2k/wxWidgets
Various wxWebView docs improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2266
2021-03-13 13:27:00 +01:00
Vadim Zeitlin
cc97e69346 Apply Scintilla doc fixes to the correct files
Back-propagate the fixes of 28d705424b (Fix double words and article
mismatches in docs., 2021-03-10) to interface/wx/stc/stc.h to the files
that this header is generated from to avoid losing these changes when
it's regenerated the next time.

See https://github.com/wxWidgets/wxWidgets/pull/2273
2021-03-13 13:17:51 +01:00
PB
1cb066364f Fix ignored path for MSW sources for GitHub CI
Due to a copy&paste mistake the path wrongly included non-existing "wx"
folder.

Closes https://github.com/wxWidgets/wxWidgets/pull/2275
2021-03-13 13:13:05 +01:00
Vadim Zeitlin
1830128cbd Merge branch 'ownerdrawn-checkbox-dpi' of https://github.com/MaartenBent/wxWidgets
Fix size of owner-drawn checkbox at non-standard DPI.

See https://github.com/wxWidgets/wxWidgets/pull/2274
2021-03-13 12:50:25 +01:00
Artur Wieczorek
2a536c359c Fix visual state of enabled/disabled wxPropertyGrid
wxPropertyGrid needs to be refreshed while enabling/disabling to display
proper visual states of all wxPGProperty items.
2021-03-12 21:41:40 +01:00
Artur Wieczorek
02af9b0295 Add option to demonstrate disabled wxPropertyGrid in propgrid sample 2021-03-12 20:35:06 +01:00
Maarten Bent
7f278b7ff9 Remove unused function declaration in wxSTC ListBoxImpl
The implementation was already removed in de0992ea3d (Implement wxSTCListBox
using wxVListBox, 2019-03-19).
2021-03-11 22:31:03 +01:00
Maarten Bent
5e6000a1ee Simplify maximum width of wxSTC auto-complete listbox 2021-03-11 22:31:03 +01:00
Artur Wieczorek
c175155bad Fix higlighting properties in wxPropertyGrid without focus
When wxPropertyGrid lost the focus all selected properties (not only
the first one) should be redrawn to present their non-focused state.

Closes #19094.
2021-03-11 20:20:54 +01:00
Paul Cornett
679c3ef714 Avoid setting layout direction to wxLayout_Default in widgets sample
wxMSW doesn't support setting wxLayout_Default
2021-03-11 08:49:59 -08:00
Blake Madden
42d11b7b5a Remove extra article, hyphenate. 2021-03-11 05:49:16 -05:00
Blake Madden
b20d6c6e18 Fix minor typos in STC docs. 2021-03-11 05:39:48 -05:00
Maarten Bent
47047a608a Fix drawing undetermined state of owner-drawn checkbox 2021-03-10 23:54:12 +01:00
Maarten Bent
3a1576f74c Fix size of owner-drawn checkbox at non-standard DPI
Get the correct size from wxRendererNative instead of wxGetSystemMetrics.
Simplify positioning the button and label rectangles.

Closes #19095
2021-03-10 23:54:11 +01:00
Blake Madden
28d705424b Fix double words and article mismatches in docs. 2021-03-10 14:28:20 -05:00
Tobias Taschner
ecce094522 Document previously missing macOS wxWebView features 2021-03-09 22:13:15 +01:00
Tobias Taschner
b493970336 Apply suggestions from code review
Co-authored-by: VZ <vz-github@zeitlins.org>
2021-03-09 22:09:16 +01:00
Tobias Taschner
4e2b746ec2 Update wxWebView documentation
- Use subsections
- Unify layout of backend sections
- Refer to backends by consistent naming
- Remove Trident reference (while technically correct it's probably not very helpful for most)
- Add a warning to IE backend
- Add wxWebViewEdge doc
- Add missing event from wxWebViewEvent docs
2021-03-09 22:09:16 +01:00
Tobias Taschner
1e42ea4e97 Update some outdated notes from wxWebView docs 2021-03-09 22:09:15 +01:00
Tobias Taschner
406ade8038 Add wxWebRequest to libs page 2021-03-09 22:09:11 +01:00
Vadim Zeitlin
18edbe93f2 Merge branch 'webview_macos_missing' of https://github.com/TcT2k/wxWidgets
Implement various WebView macOS missing features.

See https://github.com/wxWidgets/wxWidgets/pull/2271
2021-03-09 21:45:19 +01:00
Vadim Zeitlin
2551df746d Merge branch 'cmake-mono-webview' of https://github.com/MaartenBent/wxWidgets
CMake: fix monolithic build with webview.

See https://github.com/wxWidgets/wxWidgets/pull/2269
2021-03-09 21:44:27 +01:00
Vadim Zeitlin
3f2c84d4a9 Add 64-bit numbers support to wxRegKey
This uses the native registry support for 64-bit values available since
Windows XP.

Note that SetValue64() can't be just called SetValue() as this would
introduce ambiguities when writing an int or an enum to the registry.
This could be avoided by providing overloads for all the arithmetic
types, but it's arguably better to be more clear about what exactly is
being written to the registry in this low-level class and using a
different name is definitely simpler.
2021-03-09 21:09:42 +01:00
Vadim Zeitlin
eb33447c39 Use template function to avoid code duplication in wxRegConfig
Don't repeat exactly the same code for 3 different types, just use a
template function instead.

Change the existing TryGetValue() helpers to take all output parameters
consistently by pointer, rather than taking only long by pointer and the
other by reference. This allows to isolate the inconsistency of the type
of wxRegKey::QueryValue() parameter in a single place here, hiding it
from the rest of wxRegConfig code.

Add an extra unit test for writing/reading longs to/from wxRegConfig.
2021-03-09 19:15:03 +01:00
Vadim Zeitlin
62cfa638c0 Remove wxT() from wxConfig unit tests
Just remove the visual noise, no real changes.
2021-03-09 19:15:03 +01:00
Vadim Zeitlin
2e6bb341b7 Use smart pointer instead of manual delete in wxConfig tests
No real changes.
2021-03-09 19:15:03 +01:00
Vadim Zeitlin
f5f2db8b44 Get rid of CppUnit boilerplate in wxConfig unit tests
No real changes.
2021-03-09 19:15:03 +01:00
Václav Slavík
7228dbf50c Merge branch 'fix-macos-listbox-looks'
Fix visual issues in wxCheckListBox on macOS.

Closes https://github.com/wxWidgets/wxWidgets/pull/2267
2021-03-09 18:46:42 +01:00
Václav Slavík
9e0a2c04a8 Don't truncate item text in wxCheckListBox on macOS
wxListBox's width adjustment code appears to have been written before
wxCheckListBox's existence, and still assumed there's only one column, at
index 0, in some places.

In wxCheckListBox, however, there are two columns, and column 0 is the
non-resizable checkbox one. We need to use column 1 (aka the last
column) for automatic width updates, because that's where the text is.
2021-03-09 18:38:59 +01:00
Tobias Taschner
4ab9ee32a8 macOS: Implement access to dev tools for wxWebView 2021-03-08 12:32:53 +01:00
Tobias Taschner
57fa1c52b7 macOS: Implement wxWebView fullscreen API 2021-03-08 12:32:48 +01:00
Tobias Taschner
3caf48b04c macOS: Implement window.print() in wxWebView
A WKUIDelegate method has to be implemented to make
a javascript calling window.print() working.
2021-03-08 11:36:19 +01:00
Maarten Bent
0bb9cd004d CMake: copy webview2 loader for monolithic build 2021-03-08 00:26:24 +01:00
Vadim Zeitlin
e00d5e131b Use new wxAppTraits::SafeMessageBox() in wxSafeShowMessage()
This allows to show message boxes in ports other than wxMSW too by doing
it only when it is safe, i.e. when the GUI is initialized, while still
keeping the old code directly using the native MessageBox() function for
MSW for maximal robustness.
2021-03-07 23:51:54 +01:00
Vadim Zeitlin
fdd4ff8bf9 Make wxSafeShowMessage() msgbox app-modal in some cases
Although we don't want to use MB_TASKMODAL unconditionally, because it
results in non-optimal UI behaviour when there is a parent window, there
is no reason not to use it when we don't have any parent anyhow, so do
this, at least.
2021-03-07 23:51:54 +01:00
Vadim Zeitlin
39883a270a Disable main window when showing msgbox in wxSafeShowMessage()
Pass correct parent HWND to ::MessageBox() in order to disable the
window while the message box is shown, as this function is supposed to
be similar to modal wxMessageBox() and it was unexpected that the
application could be reentered via the event handlers from inside it.

This required adding wxAppTraits::GetMainHWND() in order to only use the
HWND in GUI applications from the function defined in non-GUI code.
2021-03-07 23:51:54 +01:00
Vadim Zeitlin
9073221584 Use wxApp::GetTraitsIfExists() wrappers when applicable
This is simpler and more clear than testing wxTheApp explicitly.

No real changes.
2021-03-07 23:51:54 +01:00
Vadim Zeitlin
69e48f036b Add wxApp::GetMainTopWindow() wrapper
This trivial function just allows to avoid checking if wxTheApp is not
null before calling GetTopWindow() on it.

Replace the existing "wxTheApp && wxTheApp->GetTopWindow()" calls with
wxApp::GetMainTopWindow().

No real changes.
2021-03-07 23:51:54 +01:00
Vadim Zeitlin
e9f619e561 Merge branch 'modules-cleanup'
Modernize wxModule code and add AreInitialized() function.

See https://github.com/wxWidgets/wxWidgets/pull/2268
2021-03-07 23:51:04 +01:00
Vadim Zeitlin
473be74ce0 Merge branch 'CI-more-ignored-paths'
Avoid starting AppVeyor/GitHub CI builds unnecessarily.

See https://github.com/wxWidgets/wxWidgets/pull/2263
2021-03-07 23:49:52 +01:00