Commit Graph

39762 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Liam Treacy
d9dd8b1f1a Grouped related headers together 2019-01-18 11:30:43 +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
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
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
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
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
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
48bc92a72d Use wxVector<wxPropertyGridPageState*> instead of wxArrayPtrVoid 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
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