Commit Graph

65613 Commits

Author SHA1 Message Date
Vadim Zeitlin
4fce66a483 Don't document wxShowEvent as being for MSW and GTK only
It is also generated by at least wxMac and wxQt.
2019-01-18 05:26:22 +01:00
Vadim Zeitlin
c575f595f5 Merge branch 'qt_fix_radiobox_layout' of https://github.com/GeoTeric/wxWidgets
Add support for grid layout for wxRadioBox under wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1136
2019-01-18 01:14:33 +01:00
Artur Wieczorek
715b25aaf3 Allow columns reordering only if wxHD_ALLOW_REORDER style is set
Dragging the column should be allowed only if wxHD_ALLOW_REORDER style
is set.

Closes #18329.
2019-01-17 23:37:49 +01:00
Artur Wieczorek
defae61c13 Extend wxHeaderCtrl demonstration in widgets sample
Added ability to show wxHeaderCtrl with various styles.
2019-01-17 21:51:56 +01:00
Jay Nabonne
1d117b75f7 Add wxGraphicsContext implementation for wxQt
Add graphics renderer using Qt classes and use it by default in wxQt
port under MSW.

Closes https://github.com/wxWidgets/wxWidgets/pull/1139
2019-01-17 00:50:47 +01:00
Vadim Zeitlin
8571cfed2f Remove unnecessary RECT initialization in WM_NCCALCSIZE handler
No real changes, just make RECT (lack of) initialization before calling
GetThemeBackgroundContentRect() consistent between WM_NCCALCSIZE and
WM_NCPAINT handlers.

See https://github.com/wxWidgets/wxWidgets/pull/1141
2019-01-16 22:11:15 +01:00
Vadim Zeitlin
ac9c9b3359 Merge branch 'msw-themed-borders'
Fix border drawing when using some non-standard MSW themes.

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

Closes https://github.com/wxWidgets/wxWidgets/pull/1141
2019-01-16 21:42:01 +01:00
Vadim Zeitlin
761564021c Also change minimum macOS version to 10.9 for CMake
Update CMAKE_OSX_DEPLOYMENT_TARGET default value to match configure
builds, see the previous commit.
2019-01-16 15:09:18 +01:00
Vadim Zeitlin
7226a8f4df Use 10.9 SDK by default in configure under macOS
On modern macOS systems, libstdc++ headers are not installed by default
any more and using 10.7 SDK requires them, so running configure fails
out of the box.

Avoid this by defaulting to the earliest SDK version which works even
under 10.14.
2019-01-16 14:51:08 +01:00
Vadim Zeitlin
712e3652ff Deal with themes not implementing GetThemeBackgroundContentRect()
Some custom themes apparently don't implement this function at all and
just return failure error code from it, but our code either assumed that
it never failed (when handling WM_NCPAINT) or didn't handle its failure
correctly (when handle WM_NCCALCSIZE the client rect wasn't returned at
all to the system in this case).

Fix this by just falling back to the initial rectangle in case of
failure.
2019-01-16 01:52:37 +01:00
Vadim Zeitlin
d47dbe9faa Take into account enabled state when drawing themed borders
Pass ETS_DISABLED instead of ETS_NORMAL when the window is disabled.
2019-01-16 01:52:10 +01:00
Vadim Zeitlin
78072514e9 Simplify setting nState in WM_NCPAINT handler
No real changes, this is just a trivial simplification removing some
unnecessary and unused commented out code.
2019-01-16 01:46:34 +01:00
Vadim Zeitlin
f09b3de914 Restore drawing item focus rectangle in generic wxDataViewCtrl
The current, but not selected, item was not visually marked in any way
since the changes of 4ac0250f90 which
replaced the calls to wxRendererNative::DrawFocusRect() with the calls
to DrawItemSelectionRect() which is not called when the item is not
selected.

Restore DrawFocusRect() call in this case and also pass
wxCONTROL_FOCUSED to DrawItemSelectionRect() even though this doesn't
seem to change much in practice.

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

Closes #18304.
2019-01-16 01:29:23 +01:00
Vadim Zeitlin
288d26598c Merge branch 'dvc-var-height'
Optimize generic wxDataViewCtrl performance with variable line heights.

Closes https://github.com/wxWidgets/wxWidgets/pull/1053
2019-01-16 01:25:06 +01:00
konstantin.matveyev
a985c84966 Fix crash in wxGauge with wxGA_PROGRESS under macOS
Hide, instead of destroying, the progress indicator in reset() to
prevent crashes if SetValue() is called later.

Closes https://github.com/wxWidgets/wxWidgets/pull/1137
2019-01-15 21:48:28 +01:00
Paul Cornett
b10c6ab3a8 Fix background color from wxControl::GetDefaultAttributes() with GTK+3
The default background is not explicitly set on each widget, but is determined
by a parent, usually the TLW. Fixes wxDC default background color for controls.
See #18325
2019-01-14 17:45:25 -08:00
Vadim Zeitlin
9a27ea5a2d Merge branch 'ci-url-test'
Try to work around the errors in URL test under AppVeyor.

See https://github.com/wxWidgets/wxWidgets/pull/1138
2019-01-14 23:41:31 +01:00
chris2oph
dd306cac77 Various wxFont fixes in wxQt
Implement point/pixel size accessors correctly.

Implement support for strike-through fonts.

Also implement DoSetNativeFontInfo() for wxQt.

Make wxFont unit test pass by accounting for Qt-specific aspects.

Closes https://github.com/wxWidgets/wxWidgets/pull/1113
2019-01-14 23:39:02 +01:00
chris2oph
ebb50551c4 Fix typo in a comment in Qt font code
See https://github.com/wxWidgets/wxWidgets/pull/1113
2019-01-14 23:35:57 +01:00
Chilau He
3aa6aec620 Add wxWebViewIE::MSWSetEmulationLevel()
This extends and replaces MSWSetModernEmulationLevel() by allowing a
more fine-grained choice of the emulation level used by wxWebViewIE.

Closes https://github.com/wxWidgets/wxWidgets/pull/1133
2019-01-14 23:25:14 +01:00
Chilau He
c8b977314e Change default wxWebViewIE offline behavior
Allow opening web pages using this backend on systems without any
network connection too.

See https://github.com/wxWidgets/wxWidgets/pull/1133
2019-01-14 23:16:33 +01:00
Graham Dawes
4a18bc897d Improve layout of radioboxes in horizontal sizers with expand flag under wxQT 2019-01-14 08:06:34 +00:00
Vadim Zeitlin
3c468260ff Retry in URL test when running in a CI environment
There are episodic failures in this test when running under AppVeyor,
check if retrying to connect can work around them.
2019-01-12 15:39:09 +01:00
Vadim Zeitlin
50c90f9174 Use wxScopedPtr<> in URL unit test
Don't leak the stream if an error happens in the rest of the test.
2019-01-12 15:35:44 +01:00
Artur Wieczorek
848d7d67ee Resolve ambiguity of calling overloaded wxPropertyGrid::SendEvent()
The right overloaded SendEvent() function is pointed out by explicitly
casting second argument of the call to (wxPGProperty*) type.
2019-01-11 20:08:20 +01:00
Artur Wieczorek
a005391413 Use wxEventType instead of int
This parameter identifies the type of the event so it should be of type wxEventType.
2019-01-11 19:22:50 +01:00
Artur Wieczorek
daf33b9b41 Use Boolean variable to store Boolean values 2019-01-11 19:22:49 +01:00
Artur Wieczorek
a95293d5f9 Iterate over all items of wxVector with header columns with iterator 2019-01-11 19:22:49 +01:00
Artur Wieczorek
1f739e5f82 Get rid of unused member variable 2019-01-11 19:22:48 +01:00
Artur Wieczorek
d47413697b Use wxVector<wxWindow*> instead of wxArrayPtrVoid 2019-01-11 19:22:48 +01:00
Artur Wieczorek
48bc92a72d Use wxVector<wxPropertyGridPageState*> instead of wxArrayPtrVoid 2019-01-11 19:22:47 +01:00
Artur Wieczorek
8f8955b2b9 Use wxVector<wxObject*> instead of wxArrayPGObject 2019-01-11 19:22:47 +01:00
Artur Wieczorek
eb40eb4b84 Fix horizontal scrolling of wxPropertyGrid header
wxPropertyGridHeader associated with wxPropertyGrid has to be notified about every horizontal scroll of the grid.
New position is sent with dedicated wxEVT_PG_HSCROLL event being handled by wxPropertyGridManager which in turn scrolls the header accordingly.

See #18313.
2019-01-11 19:22:34 +01:00
Graham Dawes
a823236ac1 Improve layout of wxRadioBox under wxQT 2019-01-11 15:11:28 +00:00
Graham Dawes
4f32cfc5fb Add support for grid layout in wxRadioBox under wxQT 2019-01-11 15:11:28 +00:00
Graham Dawes
12d4ed3e8c Collapse 2 loop dependent variables into a single variable 2019-01-11 15:11:28 +00:00
Graham Dawes
d411c3159c Replace template that is only ever instantiated with one type 2019-01-11 15:11:13 +00:00
Maarten Bent
8555f4abb0 CMake: Fix wx-config library list with monolithic build
Closes https://github.com/wxWidgets/wxWidgets/pull/1132
2019-01-11 14:29:26 +01:00
Richard Smith
fc65bd92a6 Fix leaks/crashes related to window scrollbars in wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/1135
2019-01-11 14:28:39 +01:00
Vadim Zeitlin
dfe0c27842 Merge branch 'fix_some_valgrind_issues' of https://github.com/GeoTeric/wxWidgets
Fix a couple of uninitialized variables (as flagged by Valgrind) in wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1134
2019-01-11 14:26:58 +01:00
Graham Dawes
5d3366abb9 Fixed another unitialised field in wxBrush for wxQT 2019-01-11 08:17:49 +00:00
Graham Dawes
337879f222 Fix Copy leaving field unitialised 2019-01-10 16:54:11 +00:00
Graham Dawes
79d8c6ff0c Fix uninitialised field 2019-01-10 16:53:51 +00:00
Václav Slavík
488cbb7848 Fix flicker when reducing wxDVC width
After 841c14c37c, reducing width of a
generic wxDataViewCtrl caused flickering (horizontal scrollbar
appearing and disappearing immediately) when the columns were resized
by user code to fix exactly.

Fixed by calling AdjustScrollbars() after determining column sizes. It
doesn’t make sense to call it before, because UpdateColumnSizes() may
change required width.

See #18295.
2019-01-10 14:25:11 +01:00
Václav Slavík
7a45b7948a Move the hack for Cmd+C in wxOSX to a better place
"&Cancel" is an unfortunate label for wxID_CANCEL buttons on Macs,
because it makes Cmd+C a shortcut for the button, which in turn makes
any attempt to copy text from a text control instead abruptly close the
dialog.

There were partial hacks around it in some places made by 22bcdf0, but
it didn't even cover all uses within wx code itself, let alone user
code. Move the hack into wxButton to catch all uses of this and remove
the accelerator as the lesser evil.
2019-01-10 13:55:20 +01:00
Graham Dawes
3f2db1b027 Fix item index in wxRadioBox events in wxQt
Use 0-based index for the radio box items, as in the other ports,
instead of auto-generated values.

Closes https://github.com/wxWidgets/wxWidgets/pull/1127
2019-01-10 04:01:39 +01:00
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