Commit Graph

66248 Commits

Author SHA1 Message Date
laptabrok
ea68934b8e Work around problems with wxGLCanvas resizing under macOS 10.14.5
This OS update has broken resizing of NSOpenGLView, which worked
correctly up until to 10.14.4.

Work around it by preventing the default implementation of update from
being executed. It's not clear why should it help with the problem, but
it does.

Closes https://github.com/wxWidgets/wxWidgets/pull/1354

Closes #18402.
2019-06-28 14:11:01 +02:00
Dummy
668f74f4d9 Fix regression in wxDC::GetPPI().y under GTK 2
This fixes a typo in 3dc16a7419 which
prevented m_mm_to_pix_y from ever being set to non-zero value.

Closes #18425.
2019-06-28 13:55:45 +02:00
Walter Cheuk
9aef9e59fc Traditional Chinese translations update from Walter Cheuk 2019-06-28 13:42:33 +02:00
Vadim Zeitlin
906fc891c8 Disable LZMA support when --disable-sys-libs is used
It seems better to disable LZMA rather than silently building the
binaries depending on an external library when we were explicitly
requested not to do it.
2019-06-27 16:18:20 +02:00
Vadim Zeitlin
789d374650 Fix line numbers in stack traces under macOS
The last digit was truncated as the code discarded the trailing "\n"
which wasn't really there, as ReadLine() helper function already removed
it, and so ended up removing the last digit of the line number,
resulting in mostly plausibly looking but completely wrong line
information in the assert dialog.
2019-06-27 16:12:26 +02:00
Anton Triest
584e2715eb Add XRC handlers for wxDataViewCtrl and related classes
The same handler is also used for wxDataViewListCtrl and
wxDataViewTreeCtrl.

Closes #18424.
2019-06-27 12:39:53 +02:00
Vadim Zeitlin
6ee5184171 Check window validity in wxNonOwnedWindow::Update() in wxMac too
This was already done in the other functions, but not this one,
resulting in a crash if it was called for an object with null m_nowpeer
(e.g. before it's created or when it's not a real wxNonOwnedWindow
object as when it's a subobject of wxTDIChildFrame).

See #18423.
2019-06-26 18:37:31 +02:00
Razvan Macovei
7f768eda2d Fix wxMDIChildFrame screen position in TDI-based implementations
This notably fixes the problem with wxAuiMDIChildFrame::GetScreenRect()
returning the wrong window position since the changes of
c1bcf16eb9.

Closes #18423.
2019-06-26 18:04:16 +02:00
Vadim Zeitlin
8afa383097 Use PlatformToolsetVersion in MSVC binaries usage instructions
This should work for any compiler version, at the cost of being slightly
less clear.

Closes #18422.
2019-06-25 17:00:27 +02:00
Vadim Zeitlin
fb2f5916b2 Add backticks around more symbols in MSW install docs
No real changes, just use backticks more consistently and extensively.
2019-06-24 18:28:25 +02:00
Vadim Zeitlin
60a8ceb57c Fix more occurrences of $(variables) eaten by Doxygen
This replaces and extends the previous commit by using `$var` instead of
`$(var)` when this makes sense and using the ugly workaround for Doxygen
expanding environment variables even inside Markdown backticks elsewhere.

Also use backticks around more strings.
2019-06-24 18:19:23 +02:00
Vadim Zeitlin
a5d7f95877 Preserve "$wxwin" verbatim in Doxygen output
It turns out that Doxygen expands $(VAR) into the actual value of the
VAR environment variable on the machine where it runs, which is
definitely not what we want in the instructions telling people to use
"$wxwin" in their projects, so remove the parentheses to prevent Doxygen
from expanding it.

Another alternative would be to escape "$" with a backslash, but this
would make the source markdown file uglier.
2019-06-24 02:37:46 +02:00
Igor Korot
b383d539b5 Make png2c script compatible with Python 3 too
Use print() and byte strings to make the code compatible with Python 3,
while also keeping it compatible with Python 2 (>= 2.6, at least).

Closes https://github.com/wxWidgets/wxWidgets/pull/1348
2019-06-21 02:13:46 +02:00
iwbnwif
7c7c717389 No longer return fixed values from wxGauge::GetBestSize() in wxGTK
Under wxGTK, wxGauge was returning fixed values for height and width.
This meant that the gauge would not center correctly in a sizer,
particularly under GTK+ 3 where the default gauge height is just a few
pixels.

Following this change, wxGauge renders correctly on GTK+ 3 and matches
the reference widget display in the gtk3-widget-factory app.

Note, this change will also result in a slimmer widget on GTK+ 2, but
the gauge height can be forced using wxGauge::SetMinSize() on the older
toolkit.

The gauge presentation is totally theme dependent under GTK+ 3. For
example, the user can have thicker gauges by setting the following in
their ~/.config/gtk-3.0/gtk.css file:

progress, trough {
  min-height: 20px;
}

Closes https://github.com/wxWidgets/wxWidgets/pull/1353
2019-06-21 02:05:19 +02:00
Vadim Zeitlin
e081d2210f Make wx/richtext/richtextstyledlg.h self-sufficient
Don't require including wx/dialog.h before including this one.

Closes #18420.
2019-06-20 16:06:36 +02:00
Graham Dawes
a8257855c3 Fix mismatched malloc/delete in wxQt wxApp
m_qtArgv elements are allocated using wxStrdupA(), so must be free()d
and not deleted.

Closes https://github.com/wxWidgets/wxWidgets/pull/1363
2019-06-20 16:00:35 +02:00
Vadim Zeitlin
61e84dc2fa Ignore MSVC linker warnings about empty object files
A number of object files in wxCore can end up being empty due to the
corresponding wxUSE_XXX options being set to 0. This is normal and
getting tons of warnings from MSVC during the build about it wasn't
helpful.

It turns out that these warnings can be suppressed by using the
undocumented, but described at

http://www.geoffchappell.com/studies/msvc/link/link/options/ignore.htm

"/ignore" option, so do this to finally get a clean build.
2019-06-20 01:54:01 +02:00
Vadim Zeitlin
8f47728fd2 Merge branch 'grid-appearance-fixes'
Draw row/columns labels better in the disabled state and improve
appearance of wxGrids with a border.

See https://github.com/wxWidgets/wxWidgets/pull/1358
2019-06-19 16:44:16 +02:00
Paul Cornett
8a254bf598 Fix wxGLCanvas painting glitch during resize with GTK3
Newly exposed window areas would sometimes not be painted after drag resize.
2019-06-18 09:50:27 -07:00
Vadim Zeitlin
5b525ed201 Advise using a border with a wxGrid not showing column/row labels
In this case a border can be useful to visually separate the grid from
the surrounding area as without it there is no separation at all.
2019-06-18 00:58:51 +02:00
Vadim Zeitlin
18956125d3 Fix copy-and-pasto in wxGrid::HideColLabels() documentation
The old sentence didn't make sense for this function.
2019-06-18 00:55:16 +02:00
Artur Wieczorek
c5d73f819a Keep track of wxHeaderCtrl events in widgets sample 2019-06-16 19:52:42 +02:00
Artur Wieczorek
2a24991110 Use wxVector<> instead of macro-based wxArray 2019-06-16 19:51:52 +02:00
Artur Wieczorek
f4e37e57e4 Get rid of unnecessary const casts
A pointer to unqualified type are converted implicitly to a more cv-qualified type.
2019-06-16 19:50:57 +02:00
Artur Wieczorek
b064608c2a Use const_cast to change the constness 2019-06-16 19:50:08 +02:00
Artur Wieczorek
2ebdfb7a40 Remove obsoleted comments 2019-06-16 19:49:01 +02:00
Artur Wieczorek
efefc97aac Use template instead of macro to generate wxPropertyGridIterator class 2019-06-16 19:47:33 +02:00
Artur Wieczorek
98c1b057e8 Use standard wxVariant instead of wxPropertyGrid-specific WXVARIANT
There is no need to use WXVARIANT for data types directly supported by wxVariant.
2019-06-16 19:46:44 +02:00
Artur Wieczorek
d404ff02a1 Support tooltips in wxPropertyGrid if support for tooltips enabled is globally 2019-06-16 19:45:40 +02:00
Artur Wieczorek
8c187ffc7a Get rid of commented out and unused macro definitions 2019-06-16 19:45:39 +02:00
Artur Wieczorek
6c437d12ab Get rid of iteration macros in wxPropertyGridPageState
Replace these macros with code they substituted for the sake of readability.
2019-06-16 19:45:39 +02:00
Artur Wieczorek
6abf507923 Get rid of unused variables 2019-06-16 19:45:12 +02:00
Artur Wieczorek
c5cf25e9df Fix resizing wxPropertyGrid columns when virtual width is enabled
Columns should be resized the same way whether virtual width is enabled or disabled.
2019-06-16 19:35:16 +02:00
Paul Cornett
f99153dbd1 Remove wxGLCanvas "size-allocate" signal handler
There is already a handler in wxWindow which will do the same thing.
2019-06-12 23:25:29 -07:00
Paul Cornett
2afb03a4bb Remove special wxGLCanvas paint event handling
Probably hasn't been needed in a very long time, if it ever was.
2019-06-12 23:23:12 -07:00
Paul Cornett
65ced79ed1 Remove wxGLCanvas "realize" signal handler, use GTKHandleRealized() instead 2019-06-12 22:30:41 -07:00
Paul Cornett
780b8720c0 Generate a size event for wxGLCanvas when it is realized
This ensures that a wxSizeEvent handler can set the initial viewport size correctly.
Fixes the initial display of the pyramid sample with GTK2.
2019-06-12 22:19:17 -07:00
Bartek Warzocha
7d5b467633 Fix sending events for non-first wxJoystick buttons under MSW
Fix bug introduced by the (relatively) recent wxJoystick rewrite: using
"!m_buttons" is wrong as it always returns 0 for any button(s) but the
first one, we need bit-wise "~m_buttons" here instead.

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

See #1142.
2019-06-12 13:50:10 +02:00
Vadim Zeitlin
d584420059 Don't draw outer border in wxGrid subwindows if wxGrid has one
Combination of multiple borders looks bad, so skip drawing the left/top
borders in wxGrid{Row,Col,Corner}LabelWindow if wxGrid already has a
border around it.
2019-06-11 14:52:39 +02:00
Vadim Zeitlin
d7fed302a3 Grey out wxGrid row/column labels when it is disabled
Grid contents was drawn in grey colour instead of the usual active one
when it was disabled, but the row and column labels kept their default
appearance, which looked out of place.

Fix this by greying them out too. This should have been arguably done in
73145b0ed1 ~17 years ago, but better late
than never.
2019-06-11 14:52:39 +02:00
Vadim Zeitlin
4cb1c8cab6 Show different wxPen cap styles in the drawing sample
This is useful to see what calling SetCap() changes at a glance.
2019-06-11 14:51:50 +02:00
Jay Nabonne
655205af77 Centre wxMessageDialog in wxQt too
Do this for consistency with the other ports.

Closes https://github.com/wxWidgets/wxWidgets/pull/1347
2019-06-11 14:38:22 +02:00
Robin Dunn
8b489f53d6 MSWSetEmulationLevel and MSWSetModernEmulationLevel are static 2019-06-10 21:03:40 -07:00
Vadim Zeitlin
39bab48dee Fix dereferencing invalid iterator in wxMemoryFSHandlerBase
Don't assume that m_findIter is always valid initially, i.e. after
FindFirst() is called, as this is not the case if the memory FS is
empty, i.e. which no files had been added to it yet.

This also allows to simplify the iteration logic, as we don't need to
check m_findArgument (which, in turn, obviates the need to clear it when
we reach the end of the iteration) and can just use m_findIter directly.

Closes #18416.
2019-06-10 18:07:57 +02:00
Tomay
3ff6647886 Use tab active/hover colours under non-MSW platforms too
This should have been part of 1bb4404527
but was forgotten there.

See #18406.

Closes https://github.com/wxWidgets/wxWidgets/pull/1344
2019-06-10 17:45:17 +02:00
Ian McInerney
d255ac1fd3 Allow using doxytag2zealdb for docset generation
This allows to generate docsets on Linux too and not only macOS as
before, when it required Xcode.

Closes https://github.com/wxWidgets/wxWidgets/pull/1343
2019-06-10 17:42:15 +02:00
Vadim Zeitlin
04435144ac Give warnings for using "x = y" as condition inside wxASSERT
Using "!(cond)" inside wxASSERT macro expansion prevented both gcc and
clang (although not MSVC) from giving -Wparentheses warnings if the
assignment operator was accidentally used instead of the equality
comparison operator.

Change the macro definition to use the condition directly, without
negating it, to let gcc/clang give the warning if appropriate.
2019-06-10 13:57:45 +02:00
Vadim Zeitlin
9f5684d171 Fix a typo in the previous commit
Use wxCLEAR instead of wxNO_OP twice.
2019-06-07 19:44:24 +02:00
Vadim Zeitlin
4184fc286f Document wxGCDC limitations in wxDC API implementation
See https://github.com/wxWidgets/wxWidgets/pull/1339
2019-06-07 17:32:53 +02:00
Maarten Bent
9732a2d99f CMake: Allow to toggle between static and dynamic MSVC runtime
After enabling wxBUILD_USE_STATIC_RUNTIME it cannot be disabled again
(except by manually modifying CMAKE_C*_FLAGS_*). Improve this by setting
the build flags to their default value when wxBUILD_USE_STATIC_RUNTIME
is disabled.

Closes https://github.com/wxWidgets/wxWidgets/pull/1338
2019-06-07 16:39:16 +02:00