Commit Graph

66410 Commits

Author SHA1 Message Date
Vadim Zeitlin
a51af03670 Revert "Add support for alignment flags to wxStaticText in wxQt"
This reverts commit 0f49825d64 because it
accidentally included unrelated changes. It will be re-committed again
soon.

See https://github.com/wxWidgets/wxWidgets/pull/1381
2019-07-03 23:47:09 +02:00
Vadim Zeitlin
8e15849706 Use wxOVERRIDE for deprecated wxBitmap methods in wxQt too
When WXWIN_COMPATIBILITY_3_0 is on, compiling this header results in a
bunch of harmless but annoying -Winconsistent-missing-override clang
warnings, so add wxOVERRIDE to silence them.

No real changes.
2019-07-03 15:31:15 +02:00
Chris Lemin
0f49825d64 Add support for alignment flags to wxStaticText in wxQt
Ensure static text fields use the alignment specified by WX on creation.

Closes https://github.com/wxWidgets/wxWidgets/pull/1381
2019-07-03 15:28:55 +02:00
Graham Dawes
e5ba6d9393 Implement SetForegroundColour and SetBackgroundColour for wxQt
Closes https://github.com/wxWidgets/wxWidgets/pull/1373
2019-07-03 13:25:55 +02:00
Graham Dawes
9e35bb92c0 Avoid focus loss event when wxComboBox popup is opened in wxQt
Prevent wxComboBox from generating a wxEVT_KILL_FOCUS event when the
user opens the drop-down list under wxQt, as logically the drop-down is
part of wxComboBox, even if it's a separate window at Qt level.

Closes https://github.com/wxWidgets/wxWidgets/pull/1377
2019-07-03 13:18:30 +02:00
Graham Dawes
1c5921f85a Fix wxTreeCtrl right click and middle click events for wxQt
This fixes the issue in the sample with the context menu not appearing
when the user right clicks on an item.

Closes https://github.com/wxWidgets/wxWidgets/pull/1379
2019-07-03 13:05:19 +02:00
Graham Dawes
25c9bf9664 Fix misaligned icons in wxTreeCtrl for wxQt
Center the items vertically, as this looks much better, and is also more
consistent with the appearance in the generic version, which was
previously used.

Closes https://github.com/wxWidgets/wxWidgets/pull/1378
2019-07-03 13:03:04 +02:00
Graham Dawes
81c31c6094 Fix wxTreeCtrl::IsVisible() for wxQt
Return false if the item is expanded but scrolled outside of the
viewport, to conform to the function documentation and the behaviour in
the other ports.

Closes https://github.com/wxWidgets/wxWidgets/pull/1380
2019-07-03 13:01:32 +02:00
Graham Dawes
07c6c61b2c Don't show context help button by default in wxQt dialogs
Only show it if wxDIALOG_EX_CONTEXTHELP was explicitly specified for
consistency with the other ports.

Closes https://github.com/wxWidgets/wxWidgets/pull/1382
2019-07-03 12:57:23 +02:00
Graham Dawes
ab553cd6db Add support for wxLB_EXTENDED style to wxQt wxListBox
Closes https://github.com/wxWidgets/wxWidgets/pull/1383
2019-07-03 12:53:26 +02:00
Vadim Zeitlin
c6ae346028 Update the latest supported MSVS version in top-level README too 2019-07-02 12:10:36 +02:00
Vadim Zeitlin
ae2cb7d347 Merge branch 'gcdc-from-context-ctor'
Don't overwrite wxGraphicsContext attributes from wxGCDC ctor.

See https://github.com/wxWidgets/wxWidgets/pull/1078
2019-07-02 11:47:01 +02:00
Vadim Zeitlin
3e728170b2 Fix best size of wxMSW wxSpinCtrl with non-default font
This has been broken by dce65bed1c after
which the actual font used for the control was not taken into account
any longer. Fix this by ensuring the wxTextCtrl used for size
calculation uses the same font as wxSpinCtrl itself.

See #12297, #18391.

Closes #18427.
2019-07-02 11:46:11 +02:00
Vadim Zeitlin
af6e478182 Don't reset wxGraphicsContext attributes in wxGCDC ctor from it
When creating wxGCDC from an existing wxGraphicsContext, it is better to
keep using the attributes (such as font, pen, brush) already configured
for it rather than overwriting them with the default values, which is
not very useful, unlike the new behaviour, which allows to configure
wxGraphicsContext using features not supported by wxDC API (e.g. alpha
channel for pens/brushes) and then use it via wxDC API only (allowing
the existing legacy code to use alpha, for example).
2019-06-30 19:19:31 +02:00
Vadim Zeitlin
0338ad5124 Factor out wxGCDCImpl::CommonInit()
No real changes, just a small refactoring that will allow reusing the
new CommonInit() method in the next commit.
2019-06-30 19:19:31 +02:00
Vadim Zeitlin
b192b4f676 Remove redundant m_colour initialization in wxGCDCImpl
This field is already initialized by the base class ctor, there is no
need to do it here again.
2019-06-30 16:15:31 +02:00
Vadim Zeitlin
2ff910de4f Add a helper for generating wxQt tags 2019-06-29 20:52:10 +02:00
Vadim Zeitlin
e67223e6c4 Merge branch 'qt-treectrl'
Closes https://github.com/wxWidgets/wxWidgets/pull/1225
2019-06-29 20:51:09 +02:00
Vadim Zeitlin
66d596dd09 Use standard naming convention for wxQtListTextCtrl::OnMove() 2019-06-29 20:49:47 +02:00
Vadim Zeitlin
2ce16cba08 Implement wxTreeCtrl::GetFirstChild() in terms of GetNextChild()
This makes the code slightly simpler, as there is just one function
instead of two, and also changes the meaning of the value stored in the
cookie parameter as a side effect: previously, it was the index of the
last retrieved item, while now it's the index of the next item to
retrieve.

The difference is not huge, but the latter is more usual and, more
importantly, avoids a stack overflow due to infinite recursion in the
treectrl sample, which assumed that cookie is never null after a
successful call to GetFirstChild(). The code in the sample is arguably
incorrect, as the cookie is supposed to be opaque, but it's still better
to avoid crashing, especially because similar code is almost certainly
present in user code if it was copied from the sample.
2019-06-29 20:49:47 +02:00
Vadim Zeitlin
21b2eef7e5 Make platform test slightly more readable
Also add a comment explaining what are we doing here.

And fix the #endif comment to match the updated #if condition.

No real changes.
2019-06-29 20:49:47 +02:00
Vadim Zeitlin
32e3846e27 Remove private headers from the public headers list
Private headers should not be installed and so must not be included in
the HDR variables in the file lists.
2019-06-29 20:49:47 +02:00
Vadim Zeitlin
a20cb4f680 Make new source file non-executable 2019-06-29 20:49:47 +02:00
Vadim Zeitlin
44634cbf90 Merge branch 'qt_tree_control' of https://github.com/GeoTeric/wxWidgets into qt-fixes
See https://github.com/wxWidgets/wxWidgets/pull/1225
2019-06-29 20:49:25 +02:00
Artur Wieczorek
a4ba437aeb Fix handling wxHeaderCtrlSimple events in widgets sample
Generic implementation of wxHeaderCtrlSimple processes EVT_HEADER_xxx internally so we cannot block processing these events in our handlers.
2019-06-29 11:16:31 +02:00
Artur Wieczorek
ec56795572 Fix recursion in calling const getters
We have to explicitly call non-const getter to avoid recursive calls of the const getter.
2019-06-29 11:16:30 +02:00
Artur Wieczorek
d55cf1fc1f Fix marking wxPGIterator template class with dllexport/import attributes
It's not allowed to mark the class template. Only explicit instantiation can be marked with dllexport/import attributes.
2019-06-29 11:16:29 +02:00
Artur Wieczorek
d0a61a09ec Make validation helper functions private in all numeric wxPG properties
wxUIntProperty::DoValidation() is already declared as private and the same access level should be applied to DoValidation() in other numeric properties because these functions are helpers intended for internal use only.
2019-06-29 11:16:01 +02:00
Artur Wieczorek
48adc38bbb Refactor code for numeric validation in numeric wxPG properties
Move template function NumericValidation() to wxNumericProperty because all data necessary to validate the value are available here: acceptable value range, SpinCtrl editor value wrapping mode, etc.
2019-06-29 11:13:14 +02:00
Artur Wieczorek
69632371e3 Implement wxNumericProperty as a base class for all wxPG numeric properties
All numeric properties (wxIntProperty, wxUIntProperty, wxFloatProperty) share some features (like specific attributes, numeric validation, SpinCtrl editor support) so for the sake of clear design it would be good to derive them from the common base class (wxNumericProperty) in which all shared functions are implemented. This class is not intended to be instantiated so it's an abstract class.
2019-06-29 11:13:13 +02:00
Artur Wieczorek
bd1b5c4111 Simplify calls for numeric validation
Instantiate NumericValidation() template directly for required data type in DoValidation() and avoid this way intermediate conversions to another data types.
2019-06-29 11:12:41 +02:00
Artur Wieczorek
e96bc37066 Refactor template function to validate numeric wxPG properties
Duplicating the code of the entire NumericValidation() template function just for one specialization (for double value type) seems to be an overkill. Only small fraction of the code (to round the validated value) is really dependent on the value type and this part can be moved to the template function GetRoundedValue() which in turn can be specialized as required.
2019-06-29 11:12:40 +02:00
Artur Wieczorek
dbb727a716 Use dedicated function to check if the mouse button is pressed 2019-06-29 11:12:39 +02:00
Artur Wieczorek
7a5fbbc06f Use separate event handlers to handle various mouse events in wxPGSpinButton
One common event handler for all mouse events is less readable than code split into separate handlers dedicated to specific event type.
2019-06-29 11:12:38 +02:00
Artur Wieczorek
8c0a210a75 Make wxPGProperty an abstract class
wxPGProperty is intended to be only a base class for property classes and therefore shouldn't be instantiated directly.
2019-06-29 11:11:35 +02:00
Artur Wieczorek
315ff49136 Fix setting column widths after changing the page in wxPropertyGridManager
Whenever page is changed header column widths have to be adjusted and all columns have to updated.
2019-06-29 11:08:45 +02:00
Vadim Zeitlin
a45b0de345 Remove dependencies of rcdefs.h on the containing directory
This doesn't seem to be actually necessary, i.e. the (implicit)
dependency on the output file is enough and using it resulted in always
redoing the custom build step with MSVS 2019 which seems to always
consider directories as missing dependencies, at least according to its
msbuild (version 16.1.76+g14b0a930a7) diagnostic build log.
2019-06-28 17:57:31 +02:00
Vadim Zeitlin
0fc8b4921c Update the list of supported MSVS versions to include 2019
The binaries-related files haven't been updated yet because we don't
provide 2019 binaries yet (build/tools/msvs/officialbuild.bat still has
to be updated too).
2019-06-28 17:53:10 +02:00
Vadim Zeitlin
59228f1224 Add MSVS 2019 solution file
Also use its native v142 toolset by default when using this version.
2019-06-28 17:50:55 +02:00
Ilya Sinitsyn
feacaf8714 Use wxWindow as a control for wxGridCellEditor
Use wxWindow instead of wxControl in wxGridCellEditor to allow using
any window as an editor control, as it doesn't need to be a wxControl.

Closes https://github.com/wxWidgets/wxWidgets/pull/1370
2019-06-28 16:47:56 +02:00
laptabrok
ea68934b8e Work around problems with wxGLCanvas resizing under macOS 10.14.5
This OS update has broken resizing of NSOpenGLView, which worked
correctly up until to 10.14.4.

Work around it by preventing the default implementation of update from
being executed. It's not clear why should it help with the problem, but
it does.

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

Closes #18402.
2019-06-28 14:11:01 +02:00
Dummy
668f74f4d9 Fix regression in wxDC::GetPPI().y under GTK 2
This fixes a typo in 3dc16a7419 which
prevented m_mm_to_pix_y from ever being set to non-zero value.

Closes #18425.
2019-06-28 13:55:45 +02:00
Walter Cheuk
9aef9e59fc Traditional Chinese translations update from Walter Cheuk 2019-06-28 13:42:33 +02:00
Vadim Zeitlin
906fc891c8 Disable LZMA support when --disable-sys-libs is used
It seems better to disable LZMA rather than silently building the
binaries depending on an external library when we were explicitly
requested not to do it.
2019-06-27 16:18:20 +02:00
Vadim Zeitlin
789d374650 Fix line numbers in stack traces under macOS
The last digit was truncated as the code discarded the trailing "\n"
which wasn't really there, as ReadLine() helper function already removed
it, and so ended up removing the last digit of the line number,
resulting in mostly plausibly looking but completely wrong line
information in the assert dialog.
2019-06-27 16:12:26 +02:00
Anton Triest
584e2715eb Add XRC handlers for wxDataViewCtrl and related classes
The same handler is also used for wxDataViewListCtrl and
wxDataViewTreeCtrl.

Closes #18424.
2019-06-27 12:39:53 +02:00
Vadim Zeitlin
6ee5184171 Check window validity in wxNonOwnedWindow::Update() in wxMac too
This was already done in the other functions, but not this one,
resulting in a crash if it was called for an object with null m_nowpeer
(e.g. before it's created or when it's not a real wxNonOwnedWindow
object as when it's a subobject of wxTDIChildFrame).

See #18423.
2019-06-26 18:37:31 +02:00
Razvan Macovei
7f768eda2d Fix wxMDIChildFrame screen position in TDI-based implementations
This notably fixes the problem with wxAuiMDIChildFrame::GetScreenRect()
returning the wrong window position since the changes of
c1bcf16eb9.

Closes #18423.
2019-06-26 18:04:16 +02:00
Vadim Zeitlin
8afa383097 Use PlatformToolsetVersion in MSVC binaries usage instructions
This should work for any compiler version, at the cost of being slightly
less clear.

Closes #18422.
2019-06-25 17:00:27 +02:00
Vadim Zeitlin
fb2f5916b2 Add backticks around more symbols in MSW install docs
No real changes, just use backticks more consistently and extensively.
2019-06-24 18:28:25 +02:00