Commit Graph

65636 Commits

Author SHA1 Message Date
Vadim Zeitlin
6fbc7a7e16 Merge branch 'qt-region-fixes'
wxQt region-related fixes: fix bugs in clipping region handling and
add wxRegion::DoCombine().

See https://github.com/wxWidgets/wxWidgets/pull/1162
2019-01-22 15:46:19 +01:00
Vadim Zeitlin
8703f0c437 Merge branch 'qt-dropdown'
Make wxQt wxComboBox behave more consistently with the other ports. Also
includes related fixes to wxChoice and wxTextEntry.

See https://github.com/wxWidgets/wxWidgets/pull/1161
2019-01-22 15:45:03 +01:00
Vadim Zeitlin
37f7da858d Merge branch 'qt-painter-fixes'
Fixes for measuring text extent and improve/simplify ownership in
wxQtGraphicsContext.

See https://github.com/wxWidgets/wxWidgets/pull/1160
2019-01-22 15:43:45 +01:00
Vadim Zeitlin
55ed5e8181 Merge branch 'master' of https://github.com/NikitaFeodonit/wxWidgets
Fixes for CMake build when using wxBUILD_USE_STATIC_RUNTIME and more.

See https://github.com/wxWidgets/wxWidgets/pull/1154
2019-01-21 23:45:39 +01:00
Vadim Zeitlin
26c9fd0033 Merge branch 'qt_listbox_failing_tests'
Fixes for item selection and cleanup.

See https://github.com/wxWidgets/wxWidgets/pull/1159
2019-01-21 23:43:56 +01:00
Vadim Zeitlin
c8f427181e Reuse code between wxListBox::Create() overloads
Add DoCreate() helper to actually create and initialize QListWidget.
2019-01-21 23:43:03 +01:00
Vadim Zeitlin
99b0efcdf2 Reformat a couple of for loops
Only whitespace changes.
2019-01-21 23:34:12 +01:00
Jay Nabonne
8412a40b90 Make some local variables const
No real changes.
2019-01-21 23:34:12 +01:00
Jay Nabonne
dddca2f516 Unindent wxRegionRefData class body
Only whitespace changes.
2019-01-21 23:34:12 +01:00
Vadim Zeitlin
c28a8c9e7e Implement wxRegion operations in terms of DoCombine() 2019-01-21 23:34:12 +01:00
Jay Nabonne
637b861eb1 Don't allocate wxRegionRefData at all for empty region
Empty regions don't really need any data.
2019-01-21 23:34:12 +01:00
Jay Nabonne
0cd2f7b687 Remove unnecessary checks for null pointer before deleting it
No real changes.
2019-01-21 23:34:12 +01:00
Jay Nabonne
5929c5831e Fix handling of empty clipping region in wxQt 2019-01-21 23:34:12 +01:00
Jay Nabonne
5b8b30d243 Don't use pointer for wxDC::m_clippingRegion in wxQt
An object can be used directly instead.
2019-01-21 23:34:12 +01:00
Jay Nabonne
a130a59111 Handle clipping regions with negative width or height in wxQt 2019-01-21 23:20:24 +01:00
Jay Nabonne
ce5301e4e6 Fix off by 1 errors in wxQt wxDC::SetClippingRegion() 2019-01-21 23:19:25 +01:00
Richard Smith
4c05b3650a Add a test for WriteText and fix implementation in wxQt 2019-01-21 23:09:17 +01:00
Richard Smith
3618356cf1 Fix wxComboBox implementation of wxTextEntry interface
Implement missing methods and send, or suppress, the expected events.
2019-01-21 23:08:42 +01:00
Richard Smith
1a7f9124b6 Update insertion point in wxTextEntry::Remove()
Move the insertion point to the end of the string if its position has
become invalid after removing part of the text.
2019-01-21 23:08:07 +01:00
Richard Smith
b0defd5876 Don't select the newly added item in wxChoice 2019-01-21 23:08:07 +01:00
Richard Smith
f2538a0bc4 Reset selection in after deleting selected item from wxChoice 2019-01-21 23:08:07 +01:00
Vadim Zeitlin
cfdf80d586 Rename wxChoice::InitialiseSort() to QtInitSort()
Use the prefix to indicate that this function is unique to this port.

Also don't make unnecessarily make it virtual.
2019-01-21 23:08:07 +01:00
Richard Smith
b27971c501 Use case-insensitive comparison in Qt wxComboBox and wxChoice
Define LexicalSortProxyModel to use the same sort order in wxQt as in
the other ports.
2019-01-21 23:08:07 +01:00
Vadim Zeitlin
000f8ef422 Put private wxQtChoice class inside an anonymous namespace
No real changes, just avoid polluting global scope unnecessarily.
2019-01-21 20:06:31 +01:00
Vadim Zeitlin
21e989751f Get rid of m_ownsPainter flag in wxQtGraphicsContext
Use wxScopedPtr to ensure that the pointer is destroyed automatically
instead of doing it manually.
2019-01-21 19:44:05 +01:00
Vadim Zeitlin
8434adb00e Use AttachPainter() instead of setting m_ownsPainter directly
No real changes, just another tiny simplification.
2019-01-21 19:40:22 +01:00
Vadim Zeitlin
6d91374dff Simplify QPainter ownership in wxQtGraphicsContext
No real changes, just refactor the code to use more explicit
AttachPainter() when giving ownership of a new QPainter object to
wxQtGraphicsContext.

This method also allows to simplify wxQtImageContext as it doesn't need
to handle ownership on its own and can just leave it to the base class.

And m_ownsPainter can now be made private.
2019-01-21 19:40:11 +01:00
Jay Nabonne
b991dc9d5a Fix using inactive painter when getting text extent
Ensure that the painter is active before using it.
2019-01-21 19:31:30 +01:00
Jay Nabonne
a5174c7483 Don't use desktop in wxQtMeasuringContext
This doesn't work, so create a new QPainter instead.
2019-01-21 19:20:57 +01:00
Vadim Zeitlin
613513501b Merge branch 'qt_dialog_show_modal' of https://github.com/GeoTeric/wxWidgets
Fix several issues with modal dialogs in wxQt and make them work more
consistently with the other ports.

See https://github.com/wxWidgets/wxWidgets/pull/1155
2019-01-21 19:10:00 +01:00
Vojtech Kral
63432e5ef5 Fix wxShowEvent not being received for maximized frames on MSW
Send wxEVT_SHOW explicitly when showing a maximized TLW under MSW as the
system doesn't send WM_SHOW in this case (as documented in the MSDN and
also confirmed by testing).

Closes https://github.com/wxWidgets/wxWidgets/pull/1153
2019-01-21 18:38:46 +01:00
Liam Treacy
a2356fbe4a Made the wxListBox::GetSelection method more efficient 2019-01-21 16:16:17 +00:00
Liam Treacy
d8d7f673b2 Added comment explaining style mutual exclusive flags 2019-01-21 16:02:03 +00:00
Liam Treacy
ab3c460a93 Updated the GetSelections method to use QListWidget method to retrieve selected items rather than iterating through the list. Also updated the UnSelectAll method to be more efficient 2019-01-21 16:00:03 +00:00
Liam Treacy
ffcda97d04 wxListBox GetSelection and DoSetSelection now use the proper QListWidget interface for specifying which index is selected. 2019-01-21 15:48:12 +00:00
NikitaFeodonit
537564ae19 CMake: use the target property OUTPUT_NAME instead of LOCATION in wx_get_dependencies 2019-01-21 18:19:39 +03:00
Liam Treacy
eb6b660d27 Added setStyle method to wxListBox to allow for the proper setting of sorting and selection style of the QListWidget 2019-01-21 14:04:47 +00:00
Graham Dawes
9cfecad878 Generate wxDialogInit event for wxDialog under wxQT 2019-01-21 13:53:59 +00:00
Graham Dawes
467bb0ec66 Add WX_HOOK_MODAL_DIALOG for wxMessageDialog under wxQT 2019-01-21 13:53:14 +00:00
Graham Dawes
26cba3bcf9 Add missing WX_HOOK_MODAL_DIALOG to wxDialog::ShowModal for wxQT 2019-01-21 12:50:36 +00:00
Graham Dawes
edc315a62f Add wxOVERRIDE to overriden wxDialog methods for wxQT 2019-01-21 12:49:06 +00:00
Liam Treacy
58df1ee13f Added wxOVERRIDE specifiers to qt wxListBox methods 2019-01-21 11:00:25 +00:00
NikitaFeodonit
ad9175d79b CMake: wx-config can not be used to connect the libraries with the debug suffix, remove 'd' suffix for the UNIX build in wx_set_target_properties 2019-01-21 13:47:15 +03:00
NikitaFeodonit
1bc43c8d7a CMake: in wx_get_dependencies, for existing targets, use its LOCATION instead of the target name 2019-01-21 13:46:24 +03:00
NikitaFeodonit
3510319048 CMake: add processing the C flags for wxBUILD_USE_STATIC_RUNTIME 2019-01-21 13:45:46 +03:00
Takeshi Abe
f10939862a Fix a typo in WebView::RunScript's comment
innderHTML -> innerHTML
2019-01-21 16:11:11 +09:00
Artur Wieczorek
e4198c149b Allow entering plus/minus characters for floating point numbers 2019-01-20 18:41:05 +01:00
Artur Wieczorek
4b0d74e04d Create wxPGHeaderCtrl in one step
Code simplification - 2-step creation is useless here.
2019-01-20 18:32:48 +01:00
Artur Wieczorek
547db34ce4 Don't allow reordering wxPropertyGrid header columns
wxPropertyGrid is designed to work with fixed order of columns.
2019-01-20 18:27:03 +01:00
Artur Wieczorek
4c9684f8d1 Improve calculating wxSimpleCheckBox rectangle
The code to calculate rectangle occupied by the check box is moved to the shared function GetBoxRect().
Check box rectangle is stored in the data member and this cached position and size are used in the drawing operations and hit tests.
2019-01-20 18:21:30 +01:00