For some reason known only to Apple, NSSecureTextField allows pasting text
into it using its standard context menu, but not using the standard Cmd+V
keyboard shortcut. Moreover, apparently the control does something special to
disable it because pressing Cmd+V does result in a call to
-[NSSecureTextField control:textView:doCommandBySelector:], but with a dummy
"noop:" selector.
Detect this specific situation and check if we're called while handling Cmd+V
event and, if this is indeed the case, do paste the text into the control.
While it could be argued that this changes the platform behaviour, it seems
very hard, if not impossible, to imagine a situation in which this would be a
problem while not being able to easily paste into password fields is
definitely a real usability bug.
When using non-default row height, text would be aligned to the top of
the row. This is a known limitation of NSTextFieldCell and the solution
is to either switch to modern view-based rendering or customize the cell
as this commit does.
See https://red-sweater.com/blog/148/what-a-difference-a-cell-makes for
Daniel Jalkut's description of this solution.
Don't override renderer's wxDVR_DEFAULT_ALIGNMENT alignment when
column's alignment is set. Call a method to recompute effective
alignment instead.
Related to a6be5bda that fixed a similar issue in wxGTK.
A convenience helper for writing generic code that may operate on
different kinds of DCs, all supported by wxGraphicsContext, but without
knowing its specific type.
Don't make the controls with wxTE_DONTWRAP (a.k.a. wxHSCROLL) style
"infinitely" wide, but just "very" wide to allow alignment still work in it.
See #17529.
Disabled controls are not supposed to accept any input, so don't send any
mouse events to them.
This fixes the behaviour of wxSlider which could be moved (and generated the
corresponding events) even when it was disabled.
Closes#17194.
Make wxListBox behave the same as in the other ports and invalidate its best
size after inserting items into it.
In the future it would be nice to call this from the base wxWindowWithItems
class itself, rather than doing it in port-specific DoInsertItems() for all
ports, but for now this will do.
Closes#17606.
Postpone resetting indent in wxOSX wxDataViewCtrl to avoid always removing,
and hence never showing the expanders at all, for wxTreeListCtrl whose model
starts its life as a list but becomes a tree as soon as any items with
children are added to it.
By postponing the call to IsListModel() until the next resize, we give the
model the time it needs to decide what it's going to be, while still removing
the unnecessary indent if there is no need for it.
Closes#17409.
Use more clear "src" and "dest" names for wxConcatFiles, wxCopyFile, and
wxRenameFile functions arguments instead of non-self-descriptive file1, file2,
etc used before.
No real changes.
Implement wxSysErrorMsg's functionality without using static buffers;
have the caller provide the buffer. When the caller uses the original
API and does not provide a buffer, a static buffer is still used.
wxSysErrorMsgStr() returns a wxString.
Also use strerror_r() instead of strerror() on platforms other than MSW.
The returned string being capitalized is not 'bad' as the ancient comment
from the 90s suggested.
At least on Windows 7+, system error messages are full sentences beginning
with a capital letter, ending in a full stop; there is no point in
lowercasing the first letter.
The changes in 065135adcc caused AVKit to be linked even when the deployment target was set to 10.7 or 10.8 which would not be available on the target machine. The deployment target is now checked before using AVKit.
::abs() truncates floating point values to ints, so use fabs() instead. This
could have been also corrected by using std::abs(), which is overloaded for
multiple types, but use fabs() for consistency with the existing code.
This fixes a problem introduced in 1e0719ad81.
See #17557.
Add support for alpha channel in the #rrggbbaa format to
wxColour::GetAsString() and FromString(). This syntax is introduced in
CSS4 spec draft (see https://drafts.csswg.org/css-color/#hex-notation)
and already used by Pango for markup as well.
Also recognize #rgb and #rgba shorter variants in FromString().
Don't unconditionally use wxWidgets' implementation of IAccessible for
all windows when wxUSE_ACCESSIBILITY is 1, because it is inferior to the
system provided one: it often lacks appropriate labels, doesn't fully
support navigation and wxIAccessible isn't fully implemented.
The approach, when using MSAA, recommended by Microsoft documentation is
to customize accessibility for custom controls only, by proxying to the
standard and overriding what is necessary. By making this change, user
code is still allowed to customize accessibility if needed, without
negatively impacting standard controls that don't need any custom code.
See also https://github.com/wxWidgets/wxWidgets/pull/340
Avoid having entries differing just by name or email address (or, in the case
of Václav, by the use of composed vs decomposed form!) in "git shortlog"
output.
Closes https://github.com/wxWidgets/wxWidgets/pull/326
Ensure that m_pIDataObject is reset to avoid assertions from DragEnter()
during the next drag-and-drop operation after the one which resulted in an
exception being thrown.
All exceptions thrown by wxDropTarget::OnXXX() must be caught and handled in
the same way as we already do it for the exceptions in the event handlers as
we can't let the exceptions escape into system/kernel code: while it can work
in some cases, it doesn't work in general, e.g. exceptions simply disappear
when they happen in 32 bit programs under 64 bit Windows 7.
SizeWindows() optimized rendering calls to DrawSash() too aggressively
and wouldn't repaint e.g. slowly moving sash with wxSP_LIVE_UPDATE
enabled, even though child windows were repositioned.
Fix by always painting the sash from SizeWindows().
This overrides the default minimum size of 150+ pixels, avoiding swarms of
GTK3 debug warnings about "attempt to underallocate wxPizza's child GtkEntry"
Use a slightly higher idle priority so callback runs before TLW is deleted,
and ref the widget just to make sure it doesn't disappear. Avoids accessing
de-allocated memory.