Commit Graph

69534 Commits

Author SHA1 Message Date
Vadim Zeitlin
f742bbaddf Merge branch '15943-grid-autosize-loop' of https://github.com/discnl/wxWidgets
Fix infinite loop with auto-wrapped multi-line cells in wxGrid.

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

Closes #15943.
2020-12-29 17:28:17 +01:00
Jorge Moraleda
ce4d95eac0 Fix not resorting generic wxDVC when model sort order changes
We can't skip resorting wxDataViewCtrl contents when the sort order is
defined by the model class, as it can change at any moment, so restrict
this optimization to the cases when we're sorting by the value of some
column.

Closes https://github.com/wxWidgets/wxWidgets/pull/2153
2020-12-29 17:23:18 +01:00
Vadim Zeitlin
87d94819a1 Merge branch 'add-ribbonBar-coord-functions' of https://github.com/STgithub64/wxWidgets
Add wxRibbonToolBar GetToolByPos() and GetToolRect().

See https://github.com/wxWidgets/wxWidgets/pull/2152
2020-12-29 17:13:58 +01:00
VZ
9160181bcc Minor simplifications and code style fixes
No real changes.
2020-12-29 17:00:08 +01:00
Jorge Moraleda
9640f0027f Fix assert when computing best column width in generic wxDVC
Do not invoke a renderer's PrepareForItem when estimating best column
width in generic wxDVC for items with no value because PrepareForItem
fails for items with no value when the null variant cannot be converted
to the expected type.

Closes https://github.com/wxWidgets/wxWidgets/pull/2149
2020-12-29 16:47:54 +01:00
Vadim Zeitlin
f5bc0a9b31 Merge branch 'webview_edge_improvements2' of https://github.com/TcT2k/wxWidgets
Disable status bar in Edge-based webview for consistency with the other
backends.

See https://github.com/wxWidgets/wxWidgets/pull/2147
2020-12-29 16:23:32 +01:00
Christian
8255a71dc7 Fix error when clicking on empty space in wxDVC under Mac
Double clicking on empty space under the items in wxDataViewCtrl still
results in actionDoubleClick: being called, even though there is no
valid item under the mouse.

Just ignore such notifications, as we're not supposed to generate any
events in this case (neither GTK nor generic version do it) and calling
itemAtRow: with invalid row results in errors due to invalid index use.

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

Closes #18984.
2020-12-29 15:52:56 +01:00
Artur Wieczorek
34fd2bc030 Fix setting alpha flag of wxBitmap created from HBITMAP
If HBITMAP represents 32-bit bitmap we need to check if this is a bitmap with transparency (ARGB) or maybe RGB only (0RBG) and set alpha flag accordingly.

Closes #18798.
2020-12-28 14:05:56 +01:00
Dimitri Schoolwerth
c6a588424d wxGrid: Fix potential infinite loop with auto-wrap
When using wxGridCellAutoWrapStringRenderer::GetBestWidth() with a cell
containing more newlines than fit, the function never exits because it
keeps on trying to wrap fit into the number of lines based on available
height only.

Fix by also taking into account the number of newlines a cell's text
value has.

Closes #15943.
2020-12-28 00:15:28 +01:00
Dimitri Schoolwerth
ff79db8ac1 wxGrid: Add test for auto-wrapped multi-line cells
Check that a row's height doesn't change when auto-sizing a column with
an auto-wrapping cell containing newlines.

Also currently will cause an infinite loop which will be fixed in the
next commit.

See #15943.
2020-12-28 00:13:17 +01:00
Vadim Zeitlin
23c7805742 Document that wxTE_READONLY can't be used with wxTextEntryDialog
This style doesn't make any sense here, but using it is confusing
because it has the same value as wxCANCEL and is interpreted as it,
rather than as expected by users.

We can't do much about this, but at least document that this flag
doesn't work to prevent people from wasting time trying to use it.
2020-12-27 18:32:10 +01:00
Dimitri Schoolwerth
f6a9466856 Merge pull request #2151 from MaartenBent/clang-warnings
Fix clang warnings and replace tabs.
2020-12-24 10:19:37 +01:00
Gary Allen
ae9a62d5a2 Add wxRibbonToolBar GetToolPos and GetToolRect coord functions 2020-12-23 20:08:39 +02:00
Maarten Bent
a530d645d1 Replace tabs with spaces 2020-12-23 17:03:10 +01:00
Maarten Bent
32a0c57f7a CMake: mark WEBKIT2_JS_LIBRARY as advanced 2020-12-23 17:03:07 +01:00
Maarten Bent
ea4368317f Fix suggest-override warning 2020-12-23 17:03:07 +01:00
Maarten Bent
e889924bc1 Fix sign-compare warning 2020-12-23 17:03:06 +01:00
Maarten Bent
da455f3c0b Fix extra-semi-stmt warning 2020-12-23 17:03:06 +01:00
Maarten Bent
bdfe77c23f Fix redundant-parens warning 2020-12-23 17:03:06 +01:00
Maarten Bent
a6d309447a Fix unreachable-code-return and unreachable-code-break warning 2020-12-23 17:03:06 +01:00
Maarten Bent
0438ca19c1 Fix implicit-fallthrough warning 2020-12-23 17:03:05 +01:00
Maarten Bent
062147ff1c Fix conditional-uninitialized warning 2020-12-23 17:03:05 +01:00
Maarten Bent
037fd6649c Fix unused-parameter warning 2020-12-23 17:03:03 +01:00
Dimitri Schoolwerth
f6a43a6074 configure: Fix failing libpng and zlib detection
Since Apple clang version 12 implicit function declarations by default
are (rightfully) an error resulting in failure to compile the configure
tests for libpng and zlib, which make implicit use of exit.

Fix by using return statements (another solution is including stdlib.h).
2020-12-23 01:53:25 +01:00
Andreas Falkenhahn
d2fc88c03d Mac: Fix truncation of images in wxDataViewCtrl
Take into account a cell's height and adjust the row height accordingly.

See #18868.

Closes #19003.
2020-12-22 02:13:24 +01:00
Dimitri Schoolwerth
4bf117aabd Mac: Adjust wxDataViewCtrl column width calculator
Slightly improve the maximum column width calculator by rounding up
the (non-integer) width of cells using ceil() instead of adding 1
unconditionally.

See #19003.
2020-12-22 02:09:21 +01:00
Andreas Falkenhahn
9ee866551f Mac: Update column width when expanding/collapsing
Adjust autosizing columns of wxDataViewCtrl when items are expanded
or collapsed through the UI as well.

Complements commit e89e76bb82.

See #14939.

See #19003.
2020-12-22 02:04:32 +01:00
Andreas Falkenhahn
9a78bfb553 Mac: Add wxDataViewCtrl::AdjustAutosizedColumns()
Refactor common code and also for upcoming accessibility from
wxCocoaOutlineView.

Part of #19003.

Co-Authored-By: Dimitri Schoolwerth <dimitri@schoolwerth.com>
2020-12-22 02:03:38 +01:00
Dimitri Schoolwerth
1324b5122b Fix missing MAC_OS_VERSION_11_0 with pre-11.0 SDKs
Fix typos preventing MAC_OS_VERSION_11_0 from being defined when using
MacOSX SDK 10.15 or earlier.
2020-12-16 23:56:09 +01:00
Tobias Taschner
a0848c2a45 WebView Edge: Disable status bar
No other webview backend shows it's own integrated status bar
it's safe to assume applications would not expect it.
2020-12-16 15:11:48 +01:00
Vadim Zeitlin
a5c2276965 Remove unused retain count variable in wxOSX font code
This fixes a -Wunused-variable which broke the CI builds.
2020-12-15 15:22:51 +01:00
Stefan Csomor
8fa54ec09a Fixing Memory Leaking CTFontDescriptor Bug
see https://trac.wxwidgets.org/ticket/19012
2020-12-15 08:01:27 +01:00
Artur Wieczorek
9bbaab6e56 Fix converting wxBitmap to wxImage
wxBitmap can have both alpha channel and a mask so alpha channel values
should be passed to the target wxImage even if mask exists.

Closes #19010.
2020-12-14 20:06:35 +01:00
Vadim Zeitlin
1b18b1ad5c Merge branch 'platform-info-cpu-arch'
Improvements related to getting the CPU architecture name.

See https://github.com/wxWidgets/wxWidgets/pull/2141
2020-12-13 22:46:39 +01:00
Vadim Zeitlin
15c3ce6710 Add wxPlatformInfo::GetCpuArchitectureName()
This provides the same information as wxGetCpuArchitectureName(), but is
consistent with the other wxPlatformInfo accessors, which also
correspond to the existing wxGetXXX() functions, and makes it more
convenient to use this information in the application code as now
everything is available via wxPlatformInfo instead of having to use
different functions for different pieces.
2020-12-12 15:23:17 +01:00
Vadim Zeitlin
5c4461a154 Return "" and not "Unknown" from wxMSW wxGetCpuArchitectureName()
This is more consistent with the Unix version, and easier to test for
in the application code.
2020-12-12 15:18:29 +01:00
Artur Wieczorek
0c939ae727 Implement reading 16 and 32-bit color-mapped TGA images
Currently only 24-bit color-mapped images can be read.

Closes #18966.

Co-authored-by: Muster128 <Muster128@trac.wxwidgets.org>
2020-12-11 21:51:54 +01:00
Satya Das
86a3578a11 Fix syntax error in interface headers
Although these headers are not supposed to be compiled, it's still
better to avoid at least the obvious typos in them.

Closes https://github.com/wxWidgets/wxWidgets/pull/2140
2020-12-10 22:53:11 +01:00
Vadim Zeitlin
e99992b42d Fix crash when using list or tree control in ANSI build of wxMSW
Calling SystemParametersInfoForDpi() with LOGFONTA parameter corrupted
the stack because this function only accepts LOGFONTW, i.e. it wrote
twice as much data into the provided buffer as the caller expected.

This could be fixed by allocating a temporary wide buffer and converting
back, but this doesn't seem to be worth it, so just disable the use of
the DPI-specific function in the ANSI build.

Closes #19002.
2020-12-09 14:57:21 +01:00
Vadim Zeitlin
6b488723a8 Merge branch 'update-platform-details-overview'
Remove obsolete and irrelevant parts of the platform details overview in
the manual.

See https://github.com/wxWidgets/wxWidgets/pull/2139/
2020-12-08 23:28:24 +01:00
Vadim Zeitlin
143142c045 Simplify links to all the other GTK libraries too
There is no good reason to point to the latest unstable version.
2020-12-08 23:26:52 +01:00
Paul Cornett
8cc18853f0 Avoid -Wsign-compare warnings 2020-12-08 10:18:42 -08:00
Vadim Zeitlin
b4e1da1d6a Add wxWindow::GetAutoLayout() documentation
This function is not really useful for the application developers, but
should still be documented.

Closes #18917.
2020-12-08 18:47:38 +01:00
Vadim Zeitlin
938e493456 Merge branch 'osx-fixes'
Miscellaneous macOS bug fixes.

See https://github.com/wxWidgets/wxWidgets/pull/2136
2020-12-08 18:43:05 +01:00
Vadim Zeitlin
45eda0ff75 Warn about using XIM as input method with wxGTK
This results in various problems, including both the problems with
handling keyboard input (see #16840) and, even less expectedly,
graphical issues with flickering (see #18462).

Fixing or working around these issues doesn't seem to be easily
possible, but we can at least warn people about the problem.

Closes https://github.com/wxWidgets/wxWidgets/pull/2138
2020-12-08 18:41:35 +01:00
PB
688baa1097 Remove the '+' from "GTK+" everywhere 2020-12-08 17:32:39 +01:00
PB
d4b84dbb35 Update as requested in review 2020-12-08 17:24:53 +01:00
Vadim Zeitlin
8bf8cf4aae Fix link error due to StrCmpLogicalW() when using MSVC
Add the #pragma to link with shlwapi in the same object file which uses
this function, as even though the same pragma was already present in
other files, they could be completely discarded by the linker resulting
in link errors about unresolved StrCmpLogicalW() later.

Also move the MinGW-specific function declaration to the top of the
file, near the inclusion of the header which would normally declare it.
2020-12-08 16:43:33 +01:00
PB
415f16b22e Update Platform Details overview
Remove information that is no longer relevant or important.
Replace "http" with "https" everywhere.
2020-12-08 15:57:54 +01:00
Dimitri Schoolwerth
534445f14b Another fix for splitter rectangle calculation under macOS
The rect offset was correctly changed in 04a7a3f150 (Fix drawing outside
of the splitter sash under macOS, 2020-12-05), but its size was not. Fix
it too now.

See #18861.
2020-12-08 04:22:29 +01:00