Commit Graph

66994 Commits

Author SHA1 Message Date
Artur Wieczorek
2366c7ba1f Add benchmarks of drawing bitmaps with masks 2019-10-03 22:31:20 +02:00
Vadim Zeitlin
878eb6af87 Remove unused return value of wxDataViewColumn::WXUpdateWidth()
The return value was never used, so just don't bother returning it.

No real changes.
2019-10-03 02:11:44 +02:00
Vadim Zeitlin
0c90ea40c3 Don't auto-resize wxDataViewCtrl columns below their initial size
It's unexpected that decreasing the width of the control makes the last
column diminish in size until nothing (at least if it's minimum size was
not set), instead of showing horizontal scrollbar, so prevent this from
happening by considering the initial column width as being "manually
set", which prevents the code from making the column narrower than it
automatically.

This seems to make sense and is consistent with the handling of initial
size, which becomes "best", and hence "minimal", size of the control,
for wxWindow.

Closes #18343.
2019-10-03 02:04:36 +02:00
Artur Wieczorek
42ed52aec8 Don't use void for functions without arguments 2019-10-02 20:40:51 +02:00
Artur Wieczorek
c7643cefe0 Avoid compilation warnings under OS X 10.11
Warnings about incompatible pointer are generated
with 10.11 SDK so function arguments should be
constrained also for this SDK version.
2019-10-02 20:37:46 +02:00
Vadim Zeitlin
3f42c0cbf1 Revert accidentally committed file
This shouldn't have been part of ef7ab73206
2019-10-02 17:06:13 +02:00
Scott Talbert
af4076865d Fix two-finger scrolling on wxGTK under Wayland
When running under Wayland and using two-finger scrolling, GTK seems to only
emit "smooth" scrolling events.  The code was already setup to handle
GDK_SCROLL_SMOOTH events - we just needed to add GDK_SMOOTH_SCROLL_MASK to the
event mast of the window in order to receive the events.

Fixes #17734.
2019-10-01 22:15:16 -07:00
Artur Wieczorek
a771da5623 Don’t use void for functions without arguments 2019-10-02 00:54:14 +02:00
Artur Wieczorek
488582b04e Avoid unnecessary casting in the comparison
Use variable of the same type as is returned by the function to avoid casting.
2019-10-02 00:09:34 +02:00
Artur Wieczorek
3bf082a8e5 Fix preparing a bitmap in propgrid sample
Set explicitly the background colour before clearing the bitmap.
2019-10-02 00:08:25 +02:00
Artur Wieczorek
4489ddc13c Update wxPropertyGrid documentation
Mention that ChangePropertyValue() shouldn't be called from wxEVT_PG_CHANGED handler.

See #18502.
2019-10-02 00:06:58 +02:00
Artur Wieczorek
203e265d9b Fix re-creating wxComboBox in widgets sample
To preserve layout, old wxComboBox should be replaced with the new one in the same location in the sizer. So we need to create a new combo box first, put in the sizer and only after that the old combo box can be deleted.
2019-10-02 00:01:41 +02:00
Vadim Zeitlin
cfcb7111cd Stop hardcoding focus border size in collapsible pane header
Use the theme- and DPI-dependent size of the border instead.

See https://github.com/wxWidgets/wxWidgets/pull/1580
2019-10-01 20:38:00 +02:00
Vadim Zeitlin
43e1066f10 Merge branch 'collpane-bestsize'
Fix generic collapsible pane best size determination.

See https://github.com/wxWidgets/wxWidgets/pull/1580
2019-10-01 20:28:21 +02:00
Artur Wieczorek
244547a010 Return Boolean value as declared 2019-10-01 00:21:20 +02:00
Artur Wieczorek
d0311cec8d Move reused code to the separate function
Checking whether alpha info flag contains one of
the constants representing image/bitmap with alpha
channel is done more than once in the code so this
check can be moved to a dedicated function.
2019-10-01 00:21:01 +02:00
Artur Wieczorek
01b769e975 Don't use m_ prefix in the names of non-member variables
Using "m_" prefix for non-member variables is against
the naming convention and hence is misleading.
2019-10-01 00:20:43 +02:00
Artur Wieczorek
3c0dbc17de Guard functions with wxCHECK macros rather than wxASSERT
If bitmap context was not created successfully
the function execution should be terminated.
2019-10-01 00:20:15 +02:00
Artur Wieczorek
2bba863937 Get rid of unnecessary variables
We can pass NULL argument directly to CGBitmapContextCreate()
and using a temporary variable holding NULL is not necessary.
2019-10-01 00:19:51 +02:00
Vadim Zeitlin
45a4db125e Add right margin around wxGenericCollapsiblePane header too
This makes the collapsible pane allocated exactly its best size better
looking, as the header is centered now, instead of having a border on
the left side, but not on the right one.

See #18515.
2019-09-30 23:36:58 +02:00
Vadim Zeitlin
ef7ab73206 Fix wxGenericCollapsiblePane best size calculation
DoGetBestSize() actually calculated the best client size and not the
full size, as it didn't take the pane border into account.

Fix this in the simplest possible way, by just renaming the function to
DoGetBestClientSize() instead.

This ensures that the pane is actually big enough to show its contents,
without cutting off the text shown in its header.

Closes #18515.
2019-09-30 23:36:58 +02:00
Vadim Zeitlin
5d904856aa Make client size computation more parallel to OnPaint() code
Make it more clear that we do what we do in DoGetBestClientSize()
because of what our OnPaint() does.

Incidentally fix off by 1 (or 2 under non-MSW platforms) mismatch
between the 2 methods: the gap between the button and the text is
actually just 2 DIPs, not 4, but we need to add another 1 DIP for the
focus rectangle under MSW.
2019-09-30 23:36:58 +02:00
Vadim Zeitlin
19d567a29b Merge branch 'msvc-version-abi-compat'
Add wxMSVC_VERSION_ABI_COMPAT.

See https://github.com/wxWidgets/wxWidgets/pull/1576
2019-09-30 23:33:56 +02:00
Ilya Sinitsyn
f7e335c031 Fix recent regression in grid content autosizing
Fix autosizing broken in 3c72396a36: we
must add the extra margin to "extentMax".

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

Closes https://github.com/wxWidgets/wxWidgets/pull/1578
2019-09-30 17:47:38 +02:00
Vadim Zeitlin
0c1c13883c Merge branch 'per-monitor-dpi-aware-controls-2'
Improve Per-Monitor DPI awareness in more controls.

See https://github.com/wxWidgets/wxWidgets/pull/1572
2019-09-29 23:23:57 +02:00
Vadim Zeitlin
059838f5ed Compilation fix for PCH-less build
Include wx/combobox.h as we use wxDynamicCast(wxComboBox).
2019-09-29 23:21:55 +02:00
Vadim Zeitlin
8d2b2c0f56 Add wxMSVC_VERSION_ABI_COMPAT
This symbol can be predefined to use the libraries built with "vc14x" as
the compiler prefix. This can be useful to reuse the same binaries for
all ABI-compatible VC 14.x versions: 14.0 (MSVS 2015), 14.1 (2017) and
14.2 (2019).
2019-09-29 22:59:50 +02:00
Vadim Zeitlin
dc50646ae4 Document wxMSVC_VERSION and wxMSVC_VERSION_AUTO
Extend the description of library selection symbols used with MSVC to a
more general discussion of MSVC-specific symbols and document the
symbols affecting compiler prefix in this section too.
2019-09-29 22:51:11 +02:00
Vadim Zeitlin
5a785be03f Fix confusing people in the last change to the guide
s/the,/them/
2019-09-29 22:47:29 +02:00
Artur Wieczorek
90e4ceb1c6 Make wxMask::GetBitmap a public function
According to the documentation this function should be declared as public,
not protected.
2019-09-29 20:19:10 +02:00
Maarten Bent
2b41ba2702 Apply review comments 2019-09-29 19:30:39 +02:00
Maarten Bent
0a7c191e27 Fix wxChoice-based control height in wxToolBar on DPI change 2019-09-29 19:30:36 +02:00
Vadim Zeitlin
fe3f1ee6ab Update an embarrassingly outdated application writing guide
At least mention wxGraphicsContext and Bind() instead of only speaking
of wxDC and event tables.

Also mention sizers.

Do _not_ mention obsolete and deprecated wxList and friends.
2019-09-29 19:11:23 +02:00
Vadim Zeitlin
1d3dd168ac Add another email for Danny Scott to Git mailmap 2019-09-29 17:36:21 +02:00
Danny Scott
191aa30222 Update "MSVC binaries" section of the release build instructions
Reflect currently used versions.

Closes https://github.com/wxWidgets/wxWidgets/pull/1569
2019-09-29 17:34:08 +02:00
Artur Wieczorek
b21f9ff6f5 Fix getting a sub-bitmap of wxBitmap with alpha channel and mask
Since wxBitmap can have both alpha channel values and mask we have to use
alpha channel (if required) in the sub-bitmap even if the mask is provided
too.

See #18513.
2019-09-29 16:28:12 +02:00
Artur Wieczorek
93f1384f7e Don't use m_ prefix in the names of non-member variables
Using "m_" prefix for non-member variables is not in line with the naming
convention and hence is misleading.
2019-09-29 16:23:12 +02:00
Artur Wieczorek
ac9c4d06e2 Fix creating wxMask image from raw data
In the function wxMask::OSXCreate() to create a mask image, data copying
from the supplied memory buffer was not actually implemented and therefore
created mask was invalid.

Closes #18513.
2019-09-29 16:21:45 +02:00
Artur Wieczorek
96cb3b6714 Add tests of retrieving sub-bitmaps 2019-09-29 16:16:55 +02:00
Vadim Zeitlin
66526adf7a Document issues with event handlers called when mouse is captured
Notably mention that showing modal dialogs won't work in this case.

Also link to this explanation from wxListCtrl documentation as
wxEVT_LIST_ITEM_SELECTED is one of the perhaps less expected cases in
which this problem arises.

See #9973.
2019-09-29 14:57:59 +02:00
Vadim Zeitlin
7a1bc568e5 Document that move events are only generated for non-TLW in wxMSW
wxGTK only sends these events for TLWs.

Closes #18485.
2019-09-29 00:08:21 +02:00
Liam Treacy
121336a3d8 Fix setting the initial value of non-editable wxComboBox in wxQt
Use setCurrentText(), which works for non-editable combo boxes as well
as for editable ones, instead of setEditText(), which only works for the
latter ones.

Closes https://github.com/wxWidgets/wxWidgets/pull/1542
2019-09-28 23:53:01 +02:00
Maarten Bent
a24d58a6d3 Use wxWindow instead of wxDisplay for wxGraphicsContext::GetDPI 2019-09-28 23:47:04 +02:00
Maarten Bent
459ffcff61 Remember wxBitmapComboBox selection when recreating the control
Recreate the control with the correct height when adding the first item with bitmap.
2019-09-28 23:47:04 +02:00
Maarten Bent
092d507714 Update comment in wxRendererMSW::GetCheckBoxSize related to DPI 2019-09-28 23:47:04 +02:00
Maarten Bent
85a2769ae5 Use the already determined hwnd in wxWindowMSW::GetDPI 2019-09-28 23:47:04 +02:00
Maarten Bent
b39c79cb4a Set column count to 1 in wxListCtrl with list view 2019-09-28 23:47:04 +02:00
Maarten Bent
370ae40b35 Use more FromDIP for hardcoded sizes 2019-09-28 23:47:04 +02:00
Vadim Zeitlin
ff3c005519 Merge branch 'msw-encodings'
Recognize a few more system encodings under MSW, including UTF-8.
2019-09-28 23:45:05 +02:00
Vadim Zeitlin
e46385e964 Test that adding window to 2 sizers results in an assert
Check that adding a window to either the same, or different, sizer the
second time asserts -- but that it can still be moved to another sizer
if it is detached from the first one first.

Also document that SetContainingSizer() should never be called from
outside the library.

See #17166.
2019-09-28 23:42:37 +02:00