Commit Graph

65592 Commits

Author SHA1 Message Date
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
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
Artur Wieczorek
5261605a61 Use wxSizerFlags-based API in widgets sample
Make the code more clear by using wxSizerFlags.
2019-01-20 13:23:11 +01:00
Artur Wieczorek
9ff9442226 Update column width in wxHeaderCtrlSimple while resizing the column
In EVT_HEADER_RESIZING event handler there is necessary to update actual
column width and redraw the control to show the column with new width.

Closes #18331.
2019-01-20 13:22:50 +01:00
Artur Wieczorek
3000091cd2 Allow columns reordering only if its wxCOL_REORDERABLE flag is set
Dragging the column should be allowed only if wxHD_ALLOW_REORDER header
style and wxCOL_REORDERABLE column flag are both set.

Closes #18332.
2019-01-20 13:22:03 +01:00
Vadim Zeitlin
704f03e70e Don't use destroyed wxToolBar in wxFrame::SetToolBar() in wxQt
Store QToolBar pointer in wxFrame itself to avoid having to query the
already half-destroyed wxToolBar object when SetToolBar() is called from
its base class dtor.

This fixes crash when toggling the toolbar in the toolbar sample.

Closes https://github.com/wxWidgets/wxWidgets/pull/1140
2019-01-20 03:21:12 +01:00
Vadim Zeitlin
3fb84dfc0c Make wxToolBar::GetQToolBar() non-virtual and mark it as private
This method has no reason to be virtual.

Also move it to the end of the class public section and document that
it's not part of the public API.

See https://github.com/wxWidgets/wxWidgets/pull/1140
2019-01-20 03:21:11 +01:00
Vadim Zeitlin
61b391da90 Make wxFrame ctors inline in wxQt
No real changes, just make trivial (and going to remain trivial)
functions inline.
2019-01-20 03:13:04 +01:00
Vadim Zeitlin
5b36917548 Fix harmless -Wsign-compare gcc warnings in wxQt wxStatusBar code
QList::count() returns int, so cast it to size_t explicitly before
comparing with wxArray::GetCount() which returns size_t.
2019-01-20 03:01:51 +01:00
Vadim Zeitlin
5bb683bcfe Fix harmless -Wunused-parameter warnings in wxQt code
Note that other such warnings remain where they indicate important
missing functionality (notably in wxCairoContext ctor from wxPrinterDC).
2019-01-20 02:59:46 +01:00
Vadim Zeitlin
f20180e743 Avoid -Wswitch gcc warning in wxQt wxNativeFontInfo::SetStyle()
Explicitly handle wxFONTSTYLE_MAX, even if it's just to assert that it's
unexpected here.
2019-01-20 02:57:45 +01:00
jtbattle
30f9d60eec Fix ability to replay wxSound sample on OSX
The sound handle was returned to the OS after the first play completed
(or the loop first stopped), making it impossible to replay that sound
again.

Now the handle is returned upon destruction of the wxSound object.

Closes https://github.com/wxWidgets/wxWidgets/pull/1149
2019-01-19 23:17:25 +01:00
Konstantin S. Matveyev
557b8526d1 Fix several problems with wxAppProgressIndicator in wxOSX
Don't release NSProgressIndicator too soon, we need to be able to keep
it to use it later, so move "release" from wxAppProgressDockIcon ctor to
its dtor.

OTOH, remove an extraneous "retain" to fix memory leak of
wxAppProgressDockIcon.

Finally, show the indicator, if it had been hidden, when Pulse() is
called for consistency with SetProgress().

Closes https://github.com/wxWidgets/wxWidgets/pull/1150
2019-01-19 23:13:02 +01:00
Vadim Zeitlin
a0d2212bba Merge branch 'qt_menuitem' of https://github.com/GeoTeric/wxWidgets
Add wxOVERRIDE specifiers to wxMEnu{,Item,Bar} methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/1146
2019-01-19 23:05:28 +01:00
Vadim Zeitlin
d3ab6a9968 Merge branch 'qt_toolbar_area' of https://github.com/GeoTeric/wxWidgets
Use only a single position style for QToolBar and minor cleanup in the
related code.

Closes https://github.com/wxWidgets/wxWidgets/pull/1145
2019-01-19 23:04:23 +01:00
Graham Dawes
57c12db2d9 Fix GetColumnCount() not working for wxRadioBox in wxQt
Add missing SetMajorDim() call to wxRadioBox::Create().

Closes https://github.com/wxWidgets/wxWidgets/pull/1144
2019-01-19 23:03:14 +01:00
Vadim Zeitlin
2a452c0b60 Fix widgets sample build when using precompiled headers
wx/artprov.h is not included from wx/wx.h, so it needs to be always
included from this header and not only when !WX_PRECOMP.
2019-01-19 23:02:09 +01:00
Artur Wieczorek
4fabf5238f Fix harmless signed/unsigned comparison warning in widgets sample
Cast WXSIZEOF to int before comparing it with int variables.
2019-01-19 22:51:44 +01:00
Artur Wieczorek
7a6200631a Extend wxHeaderCtrl demonstration in widgets sample
Added ability to show header columns with various style flags.
2019-01-19 22:09:11 +01:00
Liam Treacy
5044283b87 Adding wxOVERRIDE specifiers to wxMenu and wxMenuBar methods 2019-01-18 13:25:27 +00:00
Liam Treacy
139070b745 Removing unnecessary forward declaration 2019-01-18 13:19:08 +00:00
Liam Treacy
3cde8607ab Adding wxOVERRIDE specifiers to menuitem methods 2019-01-18 13:17:47 +00:00
Liam Treacy
d9dd8b1f1a Grouped related headers together 2019-01-18 11:30:43 +00:00
Liam Treacy
7b5cd77299 Removing unnecessary forward declaration from toolbar.h 2019-01-18 11:09:18 +00:00
Liam Treacy
ccfec32eb9 In wxFrame::SetToolBar, only one style will now be applied to the QToolbar 2019-01-18 11:00:55 +00:00
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