Commit Graph

69510 Commits

Author SHA1 Message Date
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
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
Julian Smart
27d6dce48d Fix appearance of inactive wxAuiNotebook tabs under macOS
As we don't use any special value for the inactive caption background,
use the same value as for normal caption text for inactive caption text
too.

This is almost certainly not ideal, but at least allows the tab labels
to be readable.

Closes #18988.
2020-12-08 04:20:34 +01:00
Vadim Zeitlin
b2878e992c Merge branch 'gtk-docs'
Update wxGTK README and install instructions for 21st century.

See https://github.com/wxWidgets/wxWidgets/pull/2132
2020-12-07 14:08:00 +01:00
Vadim Zeitlin
65955a1d91 Merge branch 'dvc-kbd-shortcuts'
Add wxDVC::ExpandChildren() and handle standard keyboard shortcuts in
the generic version.

See https://github.com/wxWidgets/wxWidgets/pull/2135
2020-12-07 14:07:20 +01:00
Vadim Zeitlin
63b1f17703 Make it possible to use controls inside wxComboPopup again
This should have been done together with the changes of 41410610ef
(Don't force wxPU_CONTAINS_CONTROLS on wxPopupTransientWindow,
2020-07-10) as without this style controls inside wxComboPopup couldn't
accept focus any more, which broke the previously working code.
2020-12-07 14:06:23 +01:00
Artur Wieczorek
aa641b9aae Allow to move wxPGMultiButton to -1 coordinate
Negative coordinates of wxPGMultiButton window are legitimate here so we need to process -1 coordinate value verbatim.

Closes #18971.
2020-12-06 18:00:00 +01:00
Stefan Csomor
4aafab47e7 Simplify SetFont() in wxOSX implementations
It doesn't need to take the colour and other parameters unused any more.

Closes https://github.com/wxWidgets/wxWidgets/pull/2103
2020-12-06 00:33:30 +01:00
Vadim Zeitlin
2a8e229238 Avoid unnecessary wxDynamicCast in wxOSX code
There is no need to check if the control is a wxComboBox if it turns out
to already be a wxTextCtrl.

No real changes, just a micro-optimization and simplification.
2020-12-06 00:27:55 +01:00
Hartwig
19f9f6af57 Mark wxTextCtrl dirty before handling event in wxOSX
This fixes behaviour of wxSpinCtrl which otherwise could still use the
old value of its text part when processing spin buttons press.

Closes https://github.com/wxWidgets/wxWidgets/pull/2092
2020-12-06 00:24:16 +01:00
Andreas Falkenhahn
cd571515cb Send wxEVT_TEXT when wxComboBox value changes in wxOSX
This must be done for consistency with the other ports and because it
just generally makes sense.

Closes #18973.
2020-12-05 23:58:32 +01:00
Andreas Falkenhahn
4390a092f6 Send wxEVT_COMBOBOX immediately in wxOSX
To fix the problem with GetValue() not returning the updated value from
the event handlers, just set the new value forcefully ourselves before
generating the event rather than postponing sending the event.

This makes the event order under Mac consistent with those elsewhere,
i.e. wxEVT_COMBOBOX_CLOSEUP is now received after wxEVT_COMBOBOX there
too, and not before, as without this change.

See #18973.
2020-12-05 23:56:10 +01:00
Andy Robinson
2b51c14609 Ignore events from unknown buttons in wxOSX
In particular, don't map them to left mouse clicks because this is
really wrong.

Ideal would be to handle them in some way, but for now just throwing
them away is better than generating wrong events.

Closes #18967.
2020-12-05 23:44:57 +01:00
Andreas Falkenhahn
8bf53a7782 Fix selection after inserting items in wxListBox in wxOSX
We need to adjust the indices of the currently selected items as we need
to keep the same items, not the same indices, selected after new items
insertion.

Closes #18902.
2020-12-05 23:39:17 +01:00
Andreas Falkenhahn
f7d50ed18c Don't scroll when inserting items into wxListBox in wxOSX
This seems to have been needed in the past (see #12365), but is not
needed any more and results in unexpectedly scrolling down to the last
inserted item, which is undesirable and inconsistent with the other
platforms.

Simply revert f58438058b (Show the first, not the last, inserted item in
wxListBox in wxOSX., 2010-11-05) to fix this.

Closes #18861.
2020-12-05 23:23:59 +01:00
Andreas Falkenhahn
04a7a3f150 Fix drawing outside of the splitter sash under macOS
Take into account the extra border when using wxSP_3DBORDER.

Closes #18861.
2020-12-05 23:10:06 +01:00
Andreas Falkenhahn
701334a3ba Fix wxListBox horizontal scrollbar updating in wxOSX
Keep track of maximum width of the listbox items and update the width of
the listbox column whenever it changes.

Closes #18860.
2020-12-05 23:03:52 +01:00
Andreas Falkenhahn
e89e76bb82 Make wxCOL_WIDTH_AUTOSIZE work correctly in Mac wxDataViewCtrl
Update the width when items are expanded and collapsed and also take the
expander width into account.

Change m_ModelNotifier type to avoid casts when calling wxOSX-specific
method on it.

Closes #14939.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2020-12-05 22:45:13 +01:00
Julian Smart
9a1e820cc1 Fix restoring application window when clicking on dock icon
This didn't work any more since IsShown() returned true even for
iconized windows, so we never did anything if all windows (and, in
particular, the only window) were (was) iconized.

Fix this by checking for IsIconized() first and IsShown() only if it
returns false because it seems that IsShown() is indeed supposed to
return true for iconized windows -- at least it also does it in wxMSW.

Closes #18998.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2020-12-05 22:22:04 +01:00
Vadim Zeitlin
3b92572eb6 Focus the data view control on the sample startup
Previously focus stayed on the log text control, which was useless and
inconvenient.
2020-12-05 16:37:13 +01:00
Vadim Zeitlin
a53e69beb0 Allow expanding/collapsing items from keyboard in generic wxDVC
Add the usual handlers for '-', '+' and '*' keys. The last one is
especially convenient, as it does something that couldn't be easily done
at all interactively before.
2020-12-05 16:37:13 +01:00
Vadim Zeitlin
d47fa718cd Add wxDataViewCtrl::ExpandChildren()
This convenient method allows to expand all children of the item
recursively.

This is directly supported by both native implementations, so it makes
sense to have this in wxDataViewCtrl itself, even if it could be also
(less efficiently) implemented in the user code.
2020-12-05 16:37:13 +01:00
Vadim Zeitlin
faffc5fe0a Only invalidate row height cache when a row is really expanded
It's wasteful to do it if it's already expanded or won't be expanded
because the EXPANDING event is vetoed.
2020-12-05 16:36:12 +01:00
Vadim Zeitlin
1e28312035 Override DoExpand() in wxQt wxDataViewCtrl stub
This code doesn't work (and probably doesn't compile) anyhow, but at
least try to do the right thing in it and override DoExpand() instead of
adding a virtual Expand() hiding the non-virtual version in the base
class.
2020-12-05 13:52:48 +01:00
Vadim Zeitlin
dbc16e1633 Also document wxMediaCtrl and wxWebView dependencies
These are arguably important enough to be mentioned too.
2020-12-04 20:17:38 +01:00
Vadim Zeitlin
7e75168939 Document OpenGL-related configure options in wxGTK docs
They're sufficiently important and not obvious to be mentioned.
2020-12-04 20:17:38 +01:00