Commit Graph

66045 Commits

Author SHA1 Message Date
Vadim Zeitlin
27f1c8f445 Fix wxRadioButton grouping in wxQt
Create QButtonGroup as needed to honour wxRB_GROUP and wxRB_SINGLE
styles.

Co-Authored-By: Cătălin Răceanu <maildus@gmail.com>

Co-Authored-By: liamtreacy <liam.treacy@gmail.com>
2019-02-02 15:06:14 +01:00
Vadim Zeitlin
a913393147 Test that controls between radio buttons don't break grouping
Add a test checking that even not directly consecutive radio buttons are
still treated as being part of the same radio group.
2019-02-02 15:06:14 +01:00
Vadim Zeitlin
d403c9ecce Slightly simplify radio buttons creation in the unit test
No real changes, just add a temporary variable for the parent and use
more useful (and shorter) labels for the buttons.
2019-02-02 15:06:14 +01:00
Vadim Zeitlin
10b35c22f5 Remove unnecessary "protected:" from wx/qt/radiobut.h
No real changes, just remove an empty protected section.
2019-02-02 15:06:11 +01:00
Vadim Zeitlin
481b29e6ce Stop mapping QSize(0,0) to wxSize(-1,-1) as well
Do this for consistency with a similar recent change to wxPoint.
2019-02-02 14:24:16 +01:00
Vadim Zeitlin
1a9f0f8b8d Make trivial Qt <-> wx conversion functions inline
No real changes, just make often used and trivial functions inline as
this like an obviously better thing to do.
2019-02-02 14:24:16 +01:00
phowstan
e831703aae Handled null cursor correctly in wxQt SetCursor()
Make passing invalid wxCursor object to SetCursor() work and reset any
previously specified cursor.

Closes https://github.com/wxWidgets/wxWidgets/pull/1197
2019-02-02 14:15:11 +01:00
Artur Wieczorek
0183b47a45 Fix build with wxUSE_CLIPBOARD==0 2019-02-01 23:36:48 +01:00
Jouk
cbbb9a28d9 Add src/generic/rowheightcache.cpp to the OpenVMS makefiles for compilation 2019-02-01 13:41:25 +01:00
Maarten Bent
4aeb941c4c Demonstrate wxSlider::SetSelection() in widgets sample 2019-01-31 21:16:07 +01:00
Maarten Bent
53af5cb251 Some fixes for wxSlider in widgets sample
Correctly save the slider value before recreating the slider.
Layout the entire page instead of only the slider sizer.
Update the text controls after recreating the slider.
Always enable 'both sides' checkbox. It has additional effects in wxMSW.
2019-01-31 21:16:07 +01:00
Maarten Bent
56c7eadc0a Use wxSizerFlags for slider page in widgets sample
Don't set minimum size of right panel.
2019-01-31 21:16:06 +01:00
Maarten Bent
bf0a8ffd74 Improve guards in button pages of widgets sample
Add guards for wxCommandLinkButton.
Move CheckBoxes outside wxHAS_BITMAPTOGGLEBUTTON guard.
Remove wxHAS_ANY_BUTTON check, this is always defined with wxUSE_TOGGLEBTN.
2019-01-31 21:16:06 +01:00
Maarten Bent
8f3b87dce7 Fix wxSlider::SetThumbLength() on wxMSW
It requires TBS_FIXEDLENGTH style.
Call InvalidateBestSize because the size of the control might change.
Call Layout in the widgets sample to adjust to the changed size.
Use GetThumbLength() instead of the arbitrary defined THUMB size.
2019-01-31 21:16:06 +01:00
Maarten Bent
9f9bc40f83 Better fix layout of wxSlider labels after changing value range
Commit 0b821adf did not (always) trigger a call to DoMoveWindow.
See #17093.
2019-01-31 21:16:05 +01:00
Maarten Bent
5eaea0e43f Improve wxSlider in high DPI
Make thumb and tick size DPI dependent.
2019-01-31 21:16:05 +01:00
Maarten Bent
94f3d567c8 Centre labels above and below vertical wxSlider
Improve label position for specific combinations of wxSlider styles.
2019-01-31 21:16:05 +01:00
Maarten Bent
0e82488300 Document wxSL_BOTH style of wxSlider 2019-01-31 21:02:03 +01:00
Jouk
fd020ad152 Synchronize setp.h_vms with setup.h.in 2019-01-31 14:46:07 +01:00
Vadim Zeitlin
5154cc711a Include QRect, QSize and QString from wx/qt/private/converter.h
Similarly to the previous commit, it doesn't seem to be worth it to
avoid including these simple and common headers from there and it
simplifies code and will allow making the converter functions inline.
2019-01-30 18:12:12 +01:00
Vadim Zeitlin
b0d88a306d Include wx/qt/private/converter.h from src/qt/converter.cpp
Follow standard practice and include the header corresponding to the
source file from it explicitly.

Also include wx/gdicmn.h from the header itself, this is a pretty common
header and there is no real advantage in avoiding it there and including
it allows to avoid a bunch of forward declarations.
2019-01-30 18:07:33 +01:00
Vadim Zeitlin
6bd15cd1ee Remove duplicate header inclusion in wxQt
No real changes, just remove a redundant line.
2019-01-30 18:06:09 +01:00
Vadim Zeitlin
b5b415af87 Stop converting wxPoint(-1,-1) to QPoint(0,0) and vice versa
QPoint(0,0) is a valid position and there just doesn't seem to be any
good reason to make it invalid by mapping it to wxDefaultPosition.

Closes https://github.com/wxWidgets/wxWidgets/pull/1202
2019-01-30 18:04:42 +01:00
Vadim Zeitlin
c5f9bed8ff Merge branch 'tlw-activate-event'
Extend activation event unit tests and enable them for wxGTK where they
seem to pass too now.

See https://github.com/wxWidgets/wxWidgets/pull/1194
2019-01-30 17:40:03 +01:00
Vadim Zeitlin
4d16029f8b Merge branch 'notebook-add-page-events'
Harmonize events sent by wxNotebook::AddPage(): they are now sent only
when adding any page except the first one if it is selected in all
ports.

See https://github.com/wxWidgets/wxWidgets/pull/1192
2019-01-30 17:38:51 +01:00
Vadim Zeitlin
8fbca5cb70 Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.

This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
2019-01-30 17:35:54 +01:00
Matthew Griffin
ae94f4da9c Ensure that top level window is active when it's shown in wxQt
Under some (not totally clear) circumstances, a TLW can remain inactive
after being shown, which is undesirable, as it prevents setting focus to
its children from working.

Work around this by calling activateWindow() explicitly if necessary.

Closes https://github.com/wxWidgets/wxWidgets/pull/1179
2019-01-30 17:27:15 +01:00
Jay Nabonne
111a37fd73 Get rid of another switch/default issue by avoiding switch altogther. Makes the code more readable (I think) actually. 2019-01-30 16:09:18 +00:00
Jay Nabonne
653979936b Clean up the code a bit to follow the guidelines, including handling of default in switches and line length. 2019-01-30 15:59:37 +00:00
Jay Nabonne
58639481c6 Make OnData behave like other implementations in terms of paying attention to what GetData returns. 2019-01-30 15:25:51 +00:00
Jay Nabonne
76eee80738 Initialize m_pendingMimeData to NULL! 2019-01-30 15:21:43 +00:00
Jay Nabonne
4844c80e18 Add some consts to const things. 2019-01-30 15:19:39 +00:00
Jay Nabonne
32780f00f2 Combine two separate anonymous namespaces into one. 2019-01-30 15:11:46 +00:00
Jay Nabonne
ece6626a59 Switch wxQt to use UTF-8 for text data transfer via wxDataObject. The result otherwise was less than useful. 2019-01-30 15:03:05 +00:00
Jay Nabonne
df38836862 Fixed some spacing. 2019-01-30 14:36:06 +00:00
Jay Nabonne
6fa65900f9 Implement cursor overriding for DnD on wxQt.
This uses the cursor variant (as opposed to the icon one) since these actually are cursors, the base class looks like cursors are meant to be used, and the icon thing looks like a hack.
2019-01-30 14:22:01 +00:00
Jay Nabonne
abdebb1895 Do not allow drag and drop process on targets that do not support the formats dragged.
Privatize some Impl members.
2019-01-30 10:42:01 +00:00
Graham Dawes
c3b8b81da5 Remove unused includes from qt/window.h 2019-01-30 09:27:35 +00:00
Graham Dawes
fbc39bac54 Fix Linux build 2019-01-30 09:12:08 +00:00
Scott Talbert
aa22547b28 Document wxHtmlCellEvent::GetMouseEvent()
Closes https://github.com/wxWidgets/wxWidgets/pull/1195
2019-01-30 03:01:38 +01:00
Jay Nabonne
6ba6d9967a Change Qt wxDropTarget to remember widget and disconnect self when necessary. Clean up naming a bit. 2019-01-29 17:11:09 +00:00
Jay Nabonne
e995618a3a Be sure drop target is disconnected before destructing window. 2019-01-29 17:07:14 +00:00
Jay Nabonne
87f6707123 Fix some spacing transgressions. 2019-01-29 16:58:52 +00:00
Jay Nabonne
8c63c40953 Clean up wxDropTarget and wxWindow a bit more by moving DnD stuff fully into drop target (besides connecting and disconnecting).
Window doesn't have to know more than how to hook itself up.
Impl now performs function of event filter/adapter.
2019-01-29 16:55:31 +00:00
Jay Nabonne
2bceaaa572 Clean up wxDropTarget (first stage) by moving Qt specific stuff (e.g. QMimeData) into an Impl. 2019-01-29 16:29:58 +00:00
Jay Nabonne
323cbdabdb Implement initial try of wxDropTarget.
The drop target needs to use an event filter to capture drag-and-drop events from the window.
2019-01-29 16:13:41 +00:00
Vadim Zeitlin
f9323e4b87 Enable tests for wxTopLevelWindow::IsActive() for wxGTK too
After the addition of EventCounter::WaitEvent() call in the previous
commit these checks pass as well (with another WaitEvent() added to wait
for deactivation event as well).
2019-01-29 00:16:52 +01:00
Vadim Zeitlin
e599e26395 Test that showing a TLW generates wxActivateEvent
Wait until wxEVT_ACTIVATE arrives and check that it does.
2019-01-29 00:16:50 +01:00
Graham Dawes
3cb395a5a5 Implement wxNotebook::DeleteAllPages() for wxQt
See https://github.com/wxWidgets/wxWidgets/pull/1191
2019-01-28 19:07:28 +01:00
Vadim Zeitlin
ce1b72a4d2 Document wxNotebook::AddPage() events change in wxGTK
This hopefully shouldn't affect many people, but still document this
backwards-incompatible change.
2019-01-28 19:05:01 +01:00