Commit Graph

68049 Commits

Author SHA1 Message Date
Jorge Moraleda
e3b216b75e Consistent indentation in generic DVC 2020-04-20 19:50:26 -07:00
Jorge Moraleda
773a1876de In DVC, if current column was set by keyboard to something not editable and the user pressed Space/F2 then do not edit anything because focus is visually on that column and editing something else would be surprising. But if the current column was set by mouse to something not editable, treat the situation as if there was whole-row focus, because the mouse click could very well be targeted on the row rather than on an individual cell. 2020-04-20 19:43:34 -07:00
Jorge Moraleda
e25d869168 Added dedicated command binding of HasPage tab of DVC sample so that the radio button column has always exactly one cell checked. Before this fix this tab was incorrectly bound to the same function that controlled the ListCtrl in the third tab. 2020-04-20 17:14:13 -07:00
Jorge Moraleda
ede053def6 A DVC cell that has no value is not editable 2020-04-18 14:10:59 -07:00
Vadim Zeitlin
b90a74f6fe Minor formatting and code style fixes
Put braces around loop body.

Use const for local variables.

No real changes.
2020-04-17 23:30:07 +02:00
Vadim Zeitlin
736628f7a0 Fix crash due to dereferencing null pointer in list mode
TryAdvanceCurrentColumn() is called with NULL node in this case, so
avoid dereferencing it.
2020-04-17 23:30:07 +02:00
Vadim Zeitlin
c80626d33a Replace IsItemMultivalued() with IsItemSingleValued()
This allows to simplify logic when calling it by avoiding negation.

No real changes.
2020-04-17 23:30:07 +02:00
Vadim Zeitlin
84fb5f38be Don't call wxVariant::MakeNull() unnecessary
Simplify recently added code in wxDataViewModel::Compare().

No real changes.
2020-04-17 23:30:07 +02:00
Vadim Zeitlin
1fa1aa5937 Mention that wxDataViewModel::HasValue() became virtual in 3.1.4
This method existed since earlier versions, but couldn't be overridden
until now.
2020-04-17 23:30:07 +02:00
Jorge Moraleda
429d9d8dfc Use null as value when sorting items in a DataView control by a column for which the item does not have a value. 2020-04-14 17:48:47 -07:00
Jorge Moraleda
8b9cf87653 Added an example of overriding method HasValue in wxDataView to show how some items may not have values for some columns. 2020-04-14 17:48:47 -07:00
Jorge Moraleda
a1f90ae0de Created method to find the first column that has a value instead of assuming that the expander column is the first one. Renamed method HasItemMultipleValues with IsItemMultivalued and made it const. 2020-04-14 17:48:47 -07:00
Jorge Moraleda
8a3b0a9fd6 Consolidate common logic into a single function and revert original test for IsList() to minimize code changes. 2020-04-14 17:48:47 -07:00
Jorge Moraleda
ea4a6ec0e9 Bug fix. Ensure travis builds without errors on all platforms. 2020-04-14 17:48:47 -07:00
Jorge Moraleda
c2e4bc422c Make HasValue virtual in wxDataViewModel and have implementations use it. This addresses issue https://trac.wxwidgets.org/ticket/18724 2020-04-14 17:48:47 -07:00
mimi89999
697bd07441 Change AUI to use system caption text color on all platforms
Don't hardcode black colour, it results in unreadable text when the
theme uses dark background. Note that this was already done under Mac,
but this commit does it under all platforms.

Also improve the contrast of various other colours when using
non-default background, this notably drastically improves readability of
the button labels when using the standard MSW "high contrast" mode.

Closes https://github.com/wxWidgets/wxWidgets/pull/1791
2020-04-15 02:19:25 +02:00
Vadim Zeitlin
fe7de63730 Merge branch 'default-keyword' of git://github.com/MaartenBent/wxWidgets
Remove wxMEMBER_DEFAULT and just "= default" instead.

See https://github.com/wxWidgets/wxWidgets/pull/1794
2020-04-15 02:17:06 +02:00
Konstantin S. Matveyev
4d7000d3d4 Add missing Mac headers to the file list
Add wx/osx/core/dataview.h and wx/osx/core/mimetype.h and reorder the
files alphabetically.

Closes https://github.com/wxWidgets/wxWidgets/pull/1797
2020-04-15 02:15:18 +02:00
Vadim Zeitlin
548d27afd2 Remove unused UNIV_PLATFORM_{SRC,HDR} from build/files too
This should have been part of 2c7924dd2e (Remove the now unused
UNIV_PLATFORM_{SRC,HDR} variables, 2020-03-25) but was forgotten there.
2020-04-15 02:14:16 +02:00
Artur Wieczorek
871a7db022 Improve wxPropertyGrid text editor layout under wxOSX
Text editor field can be slightly longer
to be displayed closer to the editor button.
2020-04-14 20:50:31 +02:00
Artur Wieczorek
c34440ffee Fix positioning wxPropertyGrid editor button
Button should be shifted by width, not by height
value.
2020-04-14 20:50:06 +02:00
Artur Wieczorek
eec0fd271f Don't display cell image if wxPGProperty image exists 2020-04-13 19:47:54 +02:00
Artur Wieczorek
799f245149 Delete cached wxImageFileProperty bitmap if required size changed
Rescaled bitmap should be cached as long as the required size remains
unchanged.
2020-04-13 19:47:50 +02:00
Artur Wieczorek
f31b9b27f4 Rescale wxPGProperty bitmap while drawing
Property bitmap should be stored in its original size and rescaling
to the required size should be done only while drawing the property.
This way bitmap size will always fit to the actual wxPG line height.
2020-04-13 19:47:47 +02:00
Artur Wieczorek
b039ff1822 Adjust bitmap size to the wxPropertyGrid cell size
Bitmap inserted into the wxPG cell should be automatically rescaled while
drawing to let us using bitmaps of any size.
2020-04-13 19:47:37 +02:00
Maarten Bent
9039340da9 Revert default-member changes, only keep and use wxHAS_MEMBER_DEFAULT 2020-04-13 19:44:04 +02:00
Artur Wieczorek
1a3dc3fae6 Avoid using negative button height 2020-04-13 19:25:27 +02:00
Artur Wieczorek
f4ded62bc4 Implement wxBitmapButon without inner border as wxPG editor button under wxGTK
Editor buttons with reduced padding will let us to display slightly bigger
bitmaps.
2020-04-13 19:25:13 +02:00
Artur Wieczorek
c1bb80987f Improve implementation of wxBU_EXACTFIT style for wxButton under wxGTK2
We can reduce padding to make the button smaller and more adjusted
to the contents size.
2020-04-13 19:23:27 +02:00
Maarten Bent
1448b210b8 Use macros to define default copy constructor and assignment operator 2020-04-13 17:46:32 +02:00
PB
56915f30ae Fix broken non-Unicode MSW build
Add a missing parenthesis in a non-Unicode StartDoc() definition which
was forgotten in 948ddc6e0f (Eliminate -Wcast-qual warnings with GCC and
Clang, 2020-02-02).

Closes https://github.com/wxWidgets/wxWidgets/pull/1795
2020-04-13 16:41:33 +02:00
Vadim Zeitlin
287c1b1d11 Merge branch 'noexcept-event-tables'
Allow using noexcept handlers in event tables.

See https://github.com/wxWidgets/wxWidgets/pull/1788
2020-04-12 16:41:55 +02:00
Vadim Zeitlin
413fdfbfa4 Merge branch 'cmake-c++11-stl' of git://github.com/MaartenBent/wxWidgets
CMake: Improve STL checks, improve C++17/20 support.

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

Closes #18718.
2020-04-12 16:37:57 +02:00
Vadim Zeitlin
ed077e17cf Restore wxAnimation::GetFrame() constness
This got lost, almost surely accidentally, in 706c8e8ad6 (Merge branch
'disable-native-animation', 2020-04-07), so just restore it now.

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

Closes #18725.
2020-04-12 16:36:34 +02:00
Paul Cornett
2197f9d10e Match caret color to foreground color
Fixes cursor visibility in text control with non-default foreground color
See #18722
2020-04-11 08:48:12 -07:00
Artur Wieczorek
802ee492d6 Revert "Add option to present wxButton with wxNO_BORDER style in widgets sample"
This reverts commit 17b9c98121.

This option to select border style is already implemented in the widgets sample.
2020-04-10 20:48:21 +02:00
Artur Wieczorek
c4f5fd3581 Move duplicated code to rescale the bitmap to the shared function 2020-04-10 20:45:34 +02:00
Artur Wieczorek
f95d6463d3 Fix sizing wxBitmapButton used as wxPropertyGrid editor button
Since wxBitmapButton doesn't rescale embedded bitmap we need
to do this on our own to display entire bitmap even the button
is small.

Closes #18715.
2020-04-10 20:33:16 +02:00
Artur Wieczorek
c7aeba7ed5 Fix displaying labels in small wxPropertyGrid editor buttons
We need to create wxButtons without internal border (with
wxBU_EXACTFIT flag) to display button labels properly even
if buttons are small.

See #18715.
2020-04-10 20:31:11 +02:00
Scott Talbert
e8be37da3d Add missing documentation for wxTreeCtrl GetSpacing / SetSpacing
Closes https://github.com/wxWidgets/wxWidgets/pull/1787
2020-04-10 17:20:24 +02:00
Maarten Bent
c96014db27 CMake: install toucan.png with widgets sample
It is used on the StaticBitmap page.
2020-04-10 00:51:17 +02:00
Maarten Bent
b20daa9fb0 Fix using deleted function in TempStringRef
Use the constructor directly instead of via a make function.
2020-04-10 00:51:17 +02:00
Maarten Bent
362fe04b0f Fix previous local declaration warning in wxRegKey sample 2020-04-10 00:51:17 +02:00
Maarten Bent
52ef7157e7 Define wxMEMBER_DEFAULT similarly to the existing wxOVERRIDE
Also define wxHAS_MEMBER_DEFAULT allowing to check if '= default' is supported
(compilers that define c++11 and VS2015 and later).
2020-04-10 00:51:14 +02:00
Artur Wieczorek
215a6ee238 Implement wxBU_EXACTFIT style for wxButton under wxGTK3
GtkButton without inner border is just as big as its contents.
2020-04-09 22:50:19 +02:00
Artur Wieczorek
17b9c98121 Add option to present wxButton with wxNO_BORDER style in widgets sample 2020-04-09 22:49:14 +02:00
Vadim Zeitlin
c3810da549 Allow using noexcept methods with event tables macros
Explicitly remove noexcept before static-casting the member function
pointer to the base class pointer type to avoid compilation error with
C++17.

Add a test checking that this does work now.

Closes #18721.
2020-04-09 22:36:30 +02:00
Vadim Zeitlin
f4f70102ea Define wxNOEXCEPT similarly to the existing wxOVERRIDE
Also define wxHAS_NOEXCEPT allowing to check if noexcept is supported.

This is not used in the library yet, but probably should be.
2020-04-09 22:36:30 +02:00
Paul Cornett
d3c60b9524 Update gtk-3.0.m4 from gtk+-3.24.17 2020-04-09 09:39:32 -07:00
Paul Cornett
02ce30687b Use C linkage for callbacks 2020-04-09 09:37:07 -07:00