Commit Graph

37442 Commits

Author SHA1 Message Date
Graham Dawes
2969cefb3a Fix crash when calling wxRadioBox::Show() before Create() in wxQt
This notable happened when the radio box was loaded from XRC.

Closes https://github.com/wxWidgets/wxWidgets/pull/1126
2019-01-10 04:00:12 +01:00
Graham Dawes
dfdbba7ebc Fix wxQT crash if wxRadioBox is created without wxRA_SPECIFY_XXX
Fall back to wxRA_SPECIFY_COLS if neither it nor wxRA_SPECIFY_ROWS is
given instead of not initializing m_qtBoxLayout at all in this case and
subsequently crashing due to it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1125
2019-01-10 03:58:20 +01:00
Graham Dawes
aa422c6be2 Make scrollbar private to wxWindow under wxQt
Use QScrollbar directly instead of wxScrollbar for the window scrollbars
to ensure that wxWindow::GetChildren() doesn't return these scrollbars.

Closes https://github.com/wxWidgets/wxWidgets/pull/1124
2019-01-10 03:55:19 +01:00
Graham Dawes
34ecc6efc4 Generate wxWindowCreateEvent when creating windows in wxQt
Send the expected event at the very end of window creation process.

Closes https://github.com/wxWidgets/wxWidgets/pull/1119
2019-01-10 03:50:43 +01:00
Graham Dawes
fbbdcc058a Fix client size for wxFrame under wxQt
Avoid implicitly creating the menu bar by calling menuBar() and use
menuWidget() instead which just returns NULL if there is no menu bar,
allowing to calculate correct client size for frames without menus.

Closes https://github.com/wxWidgets/wxWidgets/pull/1120
2019-01-08 00:41:34 +01:00
Vadim Zeitlin
5ff49cb2e2 Merge branch 'qt_fix_unitialised_fields' of https://github.com/GeoTeric/wxWidgets
Add missing field initialization to a number of wxQt controls.

See https://github.com/wxWidgets/wxWidgets/pull/1092
2019-01-08 00:38:53 +01:00
Vadim Zeitlin
7935dab2e8 Merge branch 'qt_fix_missing_rtti' of https://github.com/GeoTeric/wxWidgets
Add missing wx RTTI macros to many classes in wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1095
2019-01-08 00:34:30 +01:00
Graham Dawes
45fc60b549 wxBitmapToggleButton's reported base class is wxControl 2019-01-07 11:51:05 +00:00
Graham Dawes
95b3486dc0 Fix crash in wxAuiNotebook::DoGetBestSize 2019-01-07 10:38:16 +00:00
Graham Dawes
00030b56cb Fix implementation details being used as base class for RTTI in wxQT 2019-01-07 09:18:50 +00:00
Vadim Zeitlin
9ab3acee18 Don't allow using "-" for unsigned entries in propgrid
The changes of 36f6f8ad49 allowed using
"-" (and also "+") characters even for the unsigned properties, which
hadn't been the case before and doesn't seem desirable, so undo this
part of the changes.

See #1093.
2019-01-07 04:29:45 +01:00
ali kettab
36f6f8ad49 wxTextValidator improvements
Improve char inclusion/exclusion support; update the sample to show more
features of this class and add a unit test for it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1093
2019-01-05 23:33:35 +01:00
Vadim Zeitlin
28342d7882 Fix building with wxUSE_STD_CONTAINERS=1 in C++17 mode
Don't use std::bind2nd() which doesn't exist in C++17 any longer.

Replace it with a lambda when using C++11 which is simpler and more
clear and also replace the use of functors in std::sort() calls with
lambdas.

Closes #18319.
2019-01-05 23:12:30 +01:00
Vadim Zeitlin
1d72f6af7e Fix wxMSW build in non-Unicode mode
Convert WCHAR to TCHAR explicitly in this case.

Closes #18320.
2019-01-05 00:01:09 +01:00
Artur Wieczorek
3cfec773c9 Replace wxArrayPtrVoid with wxVector<void*> 2019-01-04 21:37:27 +01:00
Artur Wieczorek
b235987a69 Use dedicated functions to covert between physical and logical coordinates of the scrolled wxPropertyGrid 2019-01-04 21:32:08 +01:00
Artur Wieczorek
42b1cca8f2 Fix repositioning editors for horizontally scrolled grid
New method of calculating of the new position/size of the editor (introduced in 95461c566d) doesn't work well in all cases so we have to go back to the (modified) old method. To get the correct position of the editor cell from the absolute position of the splitter 0 we have to shift it by the origin of the scrolled view area.

See #18313.
2019-01-04 21:31:39 +01:00
Artur Wieczorek
066c422c81 Take into account scrolling while obtaining absolute mouse pointer position
See #18313.
2019-01-04 21:30:32 +01:00
Pavel Kalugin
659ab78c6d Add support for editing dates (without time) to wxGrid
Add wxGridCellDateRenderer and wxGridCellDateRenderer which can be used
for the grid cells containing only dates, without times.

Also add wxGrid::SetColFormatDate() convenience function.

Refactor wxGridCellDateTimeRenderer slightly to reuse its code.

Closes https://github.com/wxWidgets/wxWidgets/pull/1101
2019-01-04 14:14:01 +01:00
Vadim Zeitlin
ee352d79c8 Merge branch 'ipc-dde-fixes'
wxIPC fixes when using DDE

See https://github.com/wxWidgets/wxWidgets/pull/1098

Closes #17900.
2019-01-04 14:12:53 +01:00
Vadim Zeitlin
22c18a107e Invalidate wxDisplay cache under MSW when the displays change
The cache added in 990c8bfd73 was not
invalidated properly, meaning that wrong information was returned when
displays were [dis]connected after the application startup.

Fix this at least for MSW by invalidating the cache on receiving
WM_DISPLAYCHANGE (which means that sometimes we will do it
unnecessarily, as the change in resolution of an existing display
doesn't require cache invalidation, but this shouldn't be a big problem
in practice as the speed with which the user can change the display
resolution is not very high).

Closes https://github.com/wxWidgets/wxWidgets/pull/1090
2019-01-04 14:09:56 +01:00
Vadim Zeitlin
7f63adde95 Merge branch 'select-after-delete'
Harmonize behaviour of wxItemContainer::Delete() for all controls and
ports when using single selection.

See https://github.com/wxWidgets/wxWidgets/pull/1080

Closes #18267.
2019-01-04 14:01:02 +01:00
dghart
2cf0fcb4fd Allow setting wxTimePickerCtrlGeneric from numpad keys too
Previously the generic wxTimePickerCtrl ignored numerical numpad keypresses.
2019-01-03 22:58:14 -08:00
Vadim Zeitlin
9f270c05ff Micro optimization in wxInternetFSHandler::OpenFile()
Avoid copying the content type string unnecessarily and avoid even
calling GetContentType() in the first place in case of an error.
2019-01-03 23:15:54 +01:00
Vadim Zeitlin
e287344b78 Create wxFSFile with correct MIME type in wxInternetFSHandler
Using the entire contents of "Content-Type" header as the MIME type is
wrong, the header may have optional parameters in it as well.
2019-01-03 23:10:09 +01:00
Stefan Csomor
61c413928a iOS fixes 2019-01-03 20:04:50 +01:00
Stefan Csomor
e5e6ee7e77 macOS wxWidgetImpl constructor with flags
replacing bools with int flag
2019-01-03 20:02:24 +01:00
Stefan Csomor
66a9e55f3b macOS 10.14 adaption for launch-opening files
The previous way to stop the event loop for wx-like OnInit processing was too early for 10.14, opening files during launch was not possible, see #18305
2019-01-03 17:49:20 +01:00
Stefan Csomor
5581e5079f separate non-native mouse handling from IsUserPane
NSOpenGLView is needed under 10.14 as native view, in order to reuse wx touch and mouse handling we trigger this separately from IsUserPane being true
2019-01-03 16:28:19 +01:00
Stefan Csomor
a29ea16ccd separate non-native key handling from IsUserPane
NSOpenGLView is needed under 10.14 as a native view, but it doesn’t have its own native key handling, therefore use the same code we have for non-native custom views.
2019-01-03 13:26:50 +01:00
chris2oph
155a19a1a2 Improve checks for dates range in wxQt wxCalendarCtrl
Account for the minimum and maximum dates supported by QDatePicker, both
in the code and in the test suite, which shouldn't rely on not having
any range restrictions in wxQt.

Closes https://github.com/wxWidgets/wxWidgets/pull/1088
2019-01-03 00:18:37 +01:00
Cătălin Răceanu
2a9462a260 Honor text alignment for spin controls in wxQt
Add support for wxALIGN_CENTRE_HORIZONTAL and wxALIGN_RIGHT flags.

Closes https://github.com/wxWidgets/wxWidgets/pull/1108
2019-01-03 00:15:23 +01:00
Paul Cornett
942362063d Avoid blocking paint events from long-running mouse event handlers
If a mouse event handler calls Refresh(), increase the likelyhood that a
paint event can be issued before the next mouse event occurs, by requesting
more mouse events from the the end of the handler rather than the start.
See #18314
2018-12-31 10:45:44 -08:00
Vadim Zeitlin
974c75272c Don't invalidate best size unnecessarily in wxControl::SetFont()
There is no reason to do it if the font didn't change at all.
2018-12-31 15:35:36 +01:00
Artur Wieczorek
a6570433b6 Change wxPGProperty::OnCustomPaint measure item call signature
Because horizontally scrolled wxPGProperty can have x-coordinate < 0 so there is a need to change measure item call signature from rect.x < 0 condition to something more specific to avoid misinterpretation of the calls.
2018-12-28 14:02:05 +01:00
Artur Wieczorek
e13382f400 Remove unnecessary check whether x-coordinate >= 0
Several lines before there is a block terminating the function if rect.x < 0 (measure item call) so there is no need to check after this block whether rect.x >= 0.
2018-12-28 14:02:05 +01:00
Artur Wieczorek
b569a429a2 Remove unnecessary position check
Horizontally scrolled item can have a negative x-position.
2018-12-28 14:02:04 +01:00
Artur Wieczorek
4eef8d9658 Use row height value stored already in another variable
No reason to calculate it twice.
2018-12-28 14:02:03 +01:00
Artur Wieczorek
99c53ca4bb Don't retrieve unused x-coordinate of the view 2018-12-28 14:02:03 +01:00
Artur Wieczorek
76ff4ab2b6 Use dedicated method to move rectangle 2018-12-28 14:02:02 +01:00
Artur Wieczorek
18e03af068 Use conditional operator instead of conditional statement 2018-12-28 14:02:01 +01:00
Artur Wieczorek
9d2fbef751 Only render columns that are within update region 2018-12-28 14:02:01 +01:00
Artur Wieczorek
95461c566d Fix repositioning editors for horizontally scrolled grid
Closes #18313.
2018-12-28 14:01:34 +01:00
Artur Wieczorek
9b7c281e6b Move repeating code to the dedicated template wxVector function 2018-12-27 14:25:00 +01:00
Artur Wieczorek
7d43ed0fb6 Iterate over all items of wxVector with column proportions with iterator 2018-12-27 14:23:54 +01:00
Artur Wieczorek
831a81fb90 Fix positioning property editor
Account scrolled horizontal position.

See #18313.
2018-12-27 14:22:18 +01:00
Artur Wieczorek
de6469610a Fix determining width of the entire row
See #18313.
2018-12-27 14:20:13 +01:00
Artur Wieczorek
9ad19622fd Fix drawing horizontal lines between the rows of the grid
See #18313.
2018-12-27 14:18:04 +01:00
Artur Wieczorek
2f918abf3a Clear empty space beyond the right edge of the grid
See #18313.
2018-12-27 14:15:44 +01:00
Artur Wieczorek
48c71a5f04 Fix calculating width of the first cell
See #18313.
2018-12-27 14:14:19 +01:00