Commit Graph

67142 Commits

Author SHA1 Message Date
Maarten Bent
87a97054f2 Allow to retrieve the wxWindow associated with a wxBufferedPaintDC
When a wxBufferedPaintDC is created, the base classes does not initialize the
m_window variable with the used wxWindow. Only the associated m_paintdc
initializes this variable. Add a protected function that allows to set the
wxWindow of a wxDC so GetWindow() will return the window.

This fixes the font size of custom attributes in wxDataViewCtrl when the DPI
changes.
2019-10-07 00:54:59 +02:00
Maarten Bent
a1c3fa0468 Fix wxPropertyGrid row height on DPI change
Fix collapse button size of wxPropertyGrid in High DPI.
2019-10-07 00:54:59 +02:00
Maarten Bent
62c5b2d8d1 Support DPI change in wxStyledTextCtrl
Change to zoom-level and margin width based on the active DPI.
Send wxDPIChangedEvent to all controls and windows.
2019-10-07 00:54:58 +02:00
Maarten Bent
125b2c18ea Adjust font of wxDC to DPI of associated window 2019-10-06 23:51:19 +02:00
Vadim Zeitlin
29781b1752 Update bakefile-related information in the docs
Mention that we use the legacy 0.2 bakefile branch.

Also use https://www.bakefile.org/ as Bakefile home page location.

Finally, use backticks around more files names, especially those
containing asterisks, that break Markdown syntax highlighting in Vim
otherwise.
2019-10-06 23:14:43 +02:00
Vadim Zeitlin
86fab39ac9 Regenerate MinGW makefiles using response files
This avoids errors due to overflowing MSW command line length when
linking monolithic library.

Closes #18135.
2019-10-06 23:04:21 +02:00
Paul Cornett
2704c679d5 Avoid assertion message when drawing uninitialized bitmap with GTK3, see #18520 2019-10-06 09:07:50 -07:00
Vadim Zeitlin
e677bf7bcd Fix harmless signed/unsigned comparison warnings in menu test
Make the loop variable unsigned as it's compared with the result of
WXSIZEOF().
2019-10-06 17:43:08 +02:00
Paul Cornett
82caca68ba Fix drawing border with GTK3 when non-native control is a child of a native widget
Such as wxSearchCtrl in GtkToolbar. See #18522
2019-10-06 08:28:44 -07:00
Vadim Zeitlin
95d63c1fca Update Expat submodule to avoid warning in MinGW build 2019-10-06 00:24:42 +02:00
Vadim Zeitlin
2c604863de Fix compilation after fpos_t change in with MinGW runtime 5.2
fpos_t is now a union and not just a simple typedef any more, so we
can't cast between it and long long. Unfortunately we still need to
convert between the two, so add an explicit version check and use the
private union field to make this work with the latest MinGW 32 versions.
2019-10-06 00:17:57 +02:00
Artur Wieczorek
80d0496689 Add benchmarks of drawing horizontal and vertical lines
Drawing horizontal and vertical lines may be done in a specific (optimized) way so it would be good to have separate benchmarks for such operations.
2019-10-05 20:43:34 +02:00
Vadim Zeitlin
51adb388a4 Merge branch 'dc-clear-white-default'
Fix regression in wxDC::Clear() and make wxGCDC::Clear() consistent with
it by using white if the background brush hadn't been explicitly set.

See https://github.com/wxWidgets/wxWidgets/pull/1582
2019-10-05 18:47:44 +02:00
Vadim Zeitlin
4c517dea40 Merge branch 'qt_clipboard_bitmap' of https://github.com/GeoTeric/wxWidgets
Implement copying bitmap to clipboard for wxQt.

See https://github.com/wxWidgets/wxWidgets/pull/1368
2019-10-05 15:04:47 +02:00
Vadim Zeitlin
73cab0bd4e Keep children of collapsed item selected in wxGenericTreeCtrl
Collapsing a branch shouldn't deselect all the items under it in
multi-selection mode: this doesn't seem to be useful or otherwise make
sense and makes the generic version gratuitously incompatible with the
native MSW one.

Closes #10239.

Closes https://github.com/wxWidgets/wxWidgets/pull/1581
2019-10-05 15:03:20 +02:00
Vadim Zeitlin
239f045a3f Merge branch 'textctrl-override-accels'
Allow using Ctrl-A without overriding its function in wxTextCtrl under
MSW.

See https://github.com/wxWidgets/wxWidgets/pull/1577
2019-10-05 15:02:28 +02:00
Vadim Zeitlin
4a1b1b6373 Merge branch 'fix-html-selection'
Improvements to wxHtmlWindow selection handling: use inactive background
for it when the window doesn't have focus; allow copying it with
Ctrl-Ins and fix annoying changes in layout while selecting.

Closes https://github.com/vadz/wxWidgets/pull/12
2019-10-05 14:58:38 +02:00
Pavel Kalugin
a7dc1c0e0f Fix text jumps during selection dragging on MSW
When selecting the text in wxHtmlWindow by dragging the mouse the text
to the right of the selection sometimes jumps horizontally. This happens
only on MSW and only for TrueType fonts. The reason is that
wxDC::GetPartialTextExtents() and wxDC::GetTextExtent() give different
results if the text contains characters with underhangs or overhangs.

Fix this by caching results of wxDC::GetPartialTextExtents() and using
them instead of calling wxDC::GetTextExtent().
2019-10-05 14:56:46 +02:00
Pavel Kalugin
bce4bf1c8e Fix calculation of the selection bounding rectangle 2019-10-05 14:56:46 +02:00
Pavel Kalugin
65771f685b Add wxHtmlCell::GetRect() 2019-10-05 14:56:46 +02:00
Pavel Kalugin
ba5547d640 Use Ctrl+Ins to copy the selection in wxHtmlWindow 2019-10-05 14:56:46 +02:00
Pavel Kalugin
3db142e58f Redraw selection in wxHtmlWindow on focus event 2019-10-05 14:56:46 +02:00
Pavel Kalugin
ef524931cc Fix selection background colour in wxHtmlWindow
Use inactive selection colour when the window doesn't have focus.
2019-10-05 14:56:46 +02:00
Vadim Zeitlin
c30daf10cc Explicitly cast -1 to fpos_t in our wxFtell() definition
Apparently in at least some gcc versions fpos_t is not the same thing as
long long int, resulting in compilation problems due to using different
types for the ternary operator arguments.
2019-10-05 14:43:06 +02:00
Vadim Zeitlin
564df66e1c Avoid harmless gcc warning about an unused variable
Also do the same thing in MSVC branch for consistency.
2019-10-05 14:22:16 +02:00
Vadim Zeitlin
24807f0aa9 Suppress wxKeyNames missing field initializers warnings again
This reapplies 15d9067006 which was
reverted in daae25753e for some reason,
but is still needed as we get a bunch of -Wmissing-field-initializers
from gcc 8 without it.

See https://github.com/wxWidgets/wxWidgets/pull/1463
2019-10-05 14:20:52 +02:00
Robin Dunn
7fe94fe5dd Merge branch 'ole-unsigned' 2019-10-04 16:43:33 -07:00
Robin Dunn
c49672691e CanHideColumns should be const 2019-10-04 16:36:10 -07:00
Robin Dunn
34413b8690 handle VT_UI4 and VT_UI2 types 2019-10-04 15:29:08 -07:00
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
Matthew Griffin
5c169c0cf2 Update function names, indentation and added comments 2019-10-02 15:40:16 +01:00
Matthew Griffin
531e988e5d Refactor to do custom qt clipboard actions without dynamic cast 2019-10-02 13:22:16 +01: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
Vadim Zeitlin
cf07dea50d Add unit tests for wxDC::Clear()
Verify that it behaves as documented, i.e. uses white if the background
brush is not explicitly set.
2019-10-02 02:45:28 +02:00
Vadim Zeitlin
864cc1aa71 Document that wxDC::Clear() uses white background by default
This officially documents the historical behaviour of this method in
wxMSW and wxGTK2.
2019-10-02 02:45:28 +02:00
Vadim Zeitlin
1bcde69a73 Use white in wxDC::Clear() if background brush is reset in wxGTK2
Although white background was used if the brush was never set, setting
and resetting it nothing unexpectedly (and inconsistently with the other
ports) resulted in using black background.

Fix this by just resetting the brush to white if it's invalid, instead
of not setting it at all.
2019-10-02 02:45:28 +02: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
Ilya Sinitsyn
6ed0443d2f Fix wxGrid::SetColSize for the native header
In case of the width of -1 for the native header the title width must be
calculated by the native header itself.
2019-10-01 12:31:01 +07:00
Vadim Zeitlin
40d989f297 Revert "Use white background when rendering print preview"
This reverts commit 70f0900799.

It is not necessary any more after fixes to wxDC::Clear() in the
previous commits.
2019-10-01 01:30:11 +02:00