Commit Graph

67071 Commits

Author SHA1 Message Date
Vadim Zeitlin
280f80fdfd Update libtiff submodule to fix warnings in Win64 build 2019-10-09 17:03:39 +02:00
Ilya Sinitsyn
86f14a033c Fix the issue with the grid cell editor special chars handling
Some of the grid cell editors (all of them not based on wxTextCtrl
basically, i.e. wxGridCellBoolEditor, wxGridCellChoiceEditor,
wxGridCellEnumEditor) didn't process Esc, Enter and Tab under MSW,
making them inconvenient to use.

Fix this by adding wxWANTS_CHARS style flag to ensure the editors do get
these keys.

Closes https://github.com/wxWidgets/wxWidgets/pull/1598
2019-10-09 16:57:25 +02:00
Vadim Zeitlin
19c6e004ce Don't use g_thread_supported() with non-ancient glib versions
This is useless, as it always returns true (since 2.31), and just
results in warnings about using deprecated macro (since 2.62).

Also remove the now unnecessary warning suppression macros, as
g_thread_init() wasn't deprecated in 2.30 yet, so it shouldn't give any
warnings in glib versions in which it could be actually used.
2019-10-09 15:02:18 +02:00
Ilya Sinitsyn
85b37bea49 Fix GetBestSize() for hidden controls in wxGTK
gtk_widget_get_preferred_size() return zero size if the GTK widget is
hidden, so show it temporarily in order to find its real preferred size.

Add a unit test checking that the best size of a hidden wxChoice is now
determined correctly.

Closes https://github.com/wxWidgets/wxWidgets/pull/1587
2019-10-09 14:56:49 +02:00
Vadim Zeitlin
612634fffd Merge branch 'spinctrl-fixes'
Various improvements to wxSpinCtrl and wxGridCellNumberEditor, using it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1588
2019-10-09 01:52:10 +02:00
Ilya Sinitsyn
d2776b2fba Invalidate wxSpinCtrl best size when needed in wxGTK
Also fix the initial min and best size.
2019-10-09 01:44:46 +02:00
Ilya Sinitsyn
f2286fc200 Allow processing Enter and Tab in wxGridCellNumberEditor
Add style flags to allow Tab and Enter works properly for the grid number
efitor with ranges (which uses wxSpinCtrl).
2019-10-09 01:44:40 +02:00
Ilya Sinitsyn
8dadc2e68c Improve wxGridCellNumberEditor placement in the grid
Use the best height and don't let the editor be smaller then min size.
Also align center vertically.
2019-10-09 01:44:32 +02:00
Ilya Sinitsyn
1be43ed67b Improve best size determination for wxSpinCtrl
Use the range and the base to determine the widest value string and use
it to calculate the best size.
2019-10-09 01:44:13 +02:00
Ilya Sinitsyn
9ef1b1529d Add wxControl::GetSizeFromText() helper function
Add the helper function that combines GetSizeFromTextSize() and
GetTextExtent() as they are often used together.
2019-10-09 01:43:50 +02:00
Olly Betts
e2b4cd9f77 Fix typos in comments and assertion messages
Closes https://github.com/wxWidgets/wxWidgets/pull/1596
2019-10-08 23:30:22 +02:00
Besnik Bleta
60bb1a356d Update Albanian translations 2019-10-08 19:03:36 +02:00
Vadim Zeitlin
321c1379df Fix focus after disabling the currently focused control in wxMSW
Fix a regression since 23ddf26571: initial
focus was wrong in a dialog with radio button if the focused control was
disabled. This happened because m_winLastFocused didn't correspond to
the actual focus when we tried to find the next control to focus in this
case, as m_winLastFocused was changed by wxRadioButton::SetValue().

Don't change m_winLastFocused for the window which already has focus to
avoid this problem, and also because it was useless to do this anyhow.

Closes #18521.

Closes https://github.com/wxWidgets/wxWidgets/pull/1590
2019-10-08 19:00:52 +02:00
Vadim Zeitlin
4e5095e5a5 Fix WebKit detection in configure under Mac after the last commit
The last commit accidentally removed not only the checks, but also the
actions executed when the check was successful -- restore the former
while still removing the latter.
2019-10-08 16:13:54 +02:00
Vadim Zeitlin
b8fbecc261 Remove configure tests for WebView headers under Mac
They shouldn't be necessary, as these headers should be always available
on all supported macOS versions, and they fail when using 10.15 SDK
which doesn't include Carbon headers at all any more.
2019-10-08 15:06:01 +02:00
Stefan Csomor
f83577df45
Changing datatransfer implementation from CFPasteboard to NSPasteboard API (#1264)
* changing datatransfer from CFPasteboard to NSPasteboard API

* factoring and cleaning up

* Switching back naming

* missed file

* getting wxCFStringRef to be independent of system headers

* add unichar include

* using wxCFStringRef in header

* moving to private headers, change method name

* adapting to lesser content in cfstring.h

* Removing malloc/free usage

* use wxScopedArray throughout

* using wxMemoryBuffer instead of char[]

* fixing nonprecomp headers

* missing forward decl in non-precomp builds
2019-10-08 06:32:44 +02:00
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