Commit Graph

67055 Commits

Author SHA1 Message Date
Vadim Zeitlin
9102da27ec Document that wxGLCanvas now uses physical pixels
Instruct people to use GetContentScaleFactor() to convert between
logical coordinates used by wxWindow and physical ones used by
wxGLCanvas.

See https://github.com/wxWidgets/wxWidgets/pull/1485
2019-10-08 02:23:15 +02:00
Scott Talbert
f5d02e6808 Enable Retina (HiDPI) support on OSX wxGLCanvas
Closes #15700.

Closes https://github.com/wxWidgets/wxWidgets/pull/1485
2019-10-08 02:15:11 +02:00
Scott Talbert
b134589cbb Fix OpenGL samples when using HiDPI displays
OpenGL seems to operate using physical pixels, so we need to factor in the
scale factor when setting the GL viewport.

Closes #17391.

Closes https://github.com/wxWidgets/wxWidgets/pull/1470
2019-10-08 02:14:21 +02:00
Vadim Zeitlin
0ff713c945 Merge branch 'msw-listctrl-image-fix'
Fix resetting images of wxMSW wxListCtrl columns.
2019-10-08 02:12:38 +02:00
followait
5d6f92d505 Fix clearing images of wxMSW wxListCtrl columns
Resetting LVCFMT_COL_HAS_IMAGES does work and removes the image shown
in the column without leaving any space for it, unlike the previously
used version.

Closes #18523.
2019-10-08 02:09:56 +02:00
Vadim Zeitlin
43e7536c87 Use correct mask for wxListCtrl column bitmaps in wxMSW
Do use LVCFMT_COL_HAS_IMAGES as it's the right flag to use according to
the documentation, unlike LVCFMT_IMAGE which seems to have worked only
accidentally.

See #18523.
2019-10-08 02:08:21 +02:00
mehmets
9c291ffbbc Optimize wrapping lines in wxRichTextCtrl
When wrapping long text into multiple lines, avoid unnecessary
GetFirstLineBreakPosition calls for each wrapped line, leading to
quadratic complexity.

Closes https://github.com/wxWidgets/wxWidgets/pull/1567
2019-10-08 01:38:31 +02:00
oneeyeman1
f46a5423ae Implement autosizing of columns in generic wxListCtrl
Autosize the column to fit its contents or its label width if there are
no items when its divider is double clicked.

This is consistent with wxMSW behaviour and is generally convenient.

Closes https://github.com/wxWidgets/wxWidgets/pull/1573
2019-10-08 01:33:26 +02:00
oneeyeman1
0e0ea2ad84 Fix autosizing empty columns in wxMSW wxListCtrl
Autosizing the column by double clicking on its separator line reset it
to the default width when the control was empty, which isn't especially
useful.

Set the column size to fit its header instead.

Closes #9926.

See https://github.com/wxWidgets/wxWidgets/pull/1573
2019-10-08 01:33:08 +02:00
Vadim Zeitlin
654bfaea31 Add wxListCtrl::IsEmpty()
Add a simple accessor for consistency with the other controls.
2019-10-08 01:20:44 +02:00
Vadim Zeitlin
f95ce8d9d5 Add wxListCtrlBase::GetItemCount() pure virtual
No real changes, just ensure that all derived classes implement this
method (which already was the case).
2019-10-08 01:16:50 +02:00
Vadim Zeitlin
30dabbdf69 Merge branch 'grid-native-header-autosize'
Fixes for auto-sizing grid columns when using native header control.

Closes https://github.com/wxWidgets/wxWidgets/pull/1579
2019-10-07 22:26:02 +02:00
Ilya Sinitsyn
b2194d9ad5 Fix the native header column minimal width determination
wxGrid::AutoSizeColumn can set per column minimal width and this values
must be used for native headers columns.
2019-10-07 22:25:10 +02:00
Ilya Sinitsyn
8971321542 Send the autosize column event for grid native header columns
Send wxEVT_GRID_COL_AUTO_SIZE on double clicking on a separator line of
the grid native header to allow override default behaviour.
2019-10-07 22:25:10 +02:00
Stefan Csomor
9fe0d58732 Fixes for wxCocoaLaunch
see https://github.com/wxWidgets/wxWidgets/pull/1561
2019-10-07 18:51:22 +02:00
oneeyeman1
5b6af7002c [OSX] Allow executing the bundle to return pid (#1561)
* Allow bundle execution to return actual pid under OSX

* Remove commented out leftover code

* Remove 'extern' declaration testing remnant
2019-10-07 14:14:57 +02:00
Vadim Zeitlin
c92f9e0a17 Document that wxDateTime::UNow() returns time in local time zone
This is its actual behaviour and it's the right thing to do, as it's
consistent with Now() -- even though the documentation wrongly stated
otherwise (since 324ab5e2db).

Also add a unit test checking that UNow() == Now(), except for the
milliseconds.

See #14148.

Closes #18524.

Closes https://github.com/wxWidgets/wxWidgets/pull/1594
2019-10-07 12:27:28 +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