Sizing the images stored in the list should stick to the convention
adopted in the native wxImageList implemented in wxMSW.
Images stored in the list should have the sizes as it is declared for
the list even if provided bitmaps have different sizes.
In case of discrepancies their dimensions should be adjusted accordingly
(cropped or extended).
If image using bitmap and mask colour is added to nonmasked wxImageList we
need to convert effective mask to alpha channel values prior to adding the
image to the native list to preserve transparency.
Revert 8535cde836 (Remove apparently unnecessary m_hasExplicitFont,
2020-07-14) and make 9cd3ab5ebd (Improve wxGenericTreeCtrl colours/fonts
updating on theme change, 2020-07-14) really work as expected by using
not only m_hasExplicitFont, but also m_hasExplicit{Fg,Bg}Col in order to
ensure that we only update the attributes if they hadn't been explicitly
set.
This is necessary because the hack with reusing m_has{Fg,Bg}Col didn't
work under Mac where the colour wasn't used at all when they were false.
This still seems to be a problem as the behaviour is different from that
of the other ports, but fixing this in wxOSX doesn't seem to be simple,
so don't rely on this working and use separate variables instead.
Closes#18940.
This doesn't seem to be necessary and is actually actively harmful, as
this code prevented tooltips from working with non-native windows, such
as those used inside wxSplitterWindow in the splitter sample.
Just remove this code entirely and add SetToolTip() calls to the sample
to show that they do work now.
Closes https://github.com/wxWidgets/wxWidgets/pull/1978Closes#14220.
Remove a lot of Mac-specific code from wxStatusBarMac in favour of using
shared wxStatusBarGeneric:
- Now that wxFRAME_EX_METAL aka NSWindowStyleMaskTexturedBackground
doesn’t affect text placement, there’s no reason for customized
DrawFieldText(). As a side effect of this removal, ellipsizing fields
is now supported.
- Remove customized DoUpdateStatusText() code that is no longer needed.
See https://github.com/wxWidgets/wxWidgets/pull/2160#pullrequestreview-563916013
macOS 11 has an option (on by default) to tint window backgrounds with
wallpaper colors. This means that standard window background color is
not a constant anymore and can change as the window is moved across the
screen.
The key to supporting this is to _not set background color_ internally
to what we think is the correct default color, or to repaint
backgrounds. Let the OS handle the default behavior instead.
Closes https://github.com/wxWidgets/wxWidgets/pull/2158
Notable record the commands that can be used to recover from a conflict
with the server version of the notes (merging notes is more involved and
usually not worth it, they can just be re-added after resetting).
Call GetResponse() only once.
Also put the code for State_Completed inside the case for this state in
the switch instead of testing for it separately later.
No real changes.
Semantics of this function wasn't really clear and it was used only
once, so just inline it at the point of use and define better what
happens for various states there.
Also use a switch rather than testing for individual states to make sure
this code is updated if another state is added in the future.
No real changes.
We shouldn't call SetState() to switch to the state that we're currently
already in, normally. Add an assert to verify that this indeed doesn't
happen.
Also improve the logging statement to show both the old and the new
states.
Under MSW, don't set the state to State_Cancelled as soon as Cancel()
was called, as the request was still used from the other threads
afterwards, resulting in race conditions and crashes.
Fix this by just removing the SetState(State_Cancelled) call from the
main thread, as it was redundant anyhow. This also makes the behaviour
correspond to the documentation, which indicates that Cancel() works
asynchronously.
Also ensure, for all backends, that we actually cancel the request only
once, even if public Cancel() is called multiple times. This required
renaming the existing wxWebRequestImpl::Cancel() to DoCancel().
Add a trivial wxWinHTTPCloseHandle() wrapper calling wxLogLastError() if
closing the handle failed -- this is really not expected to happen, so
make sure to at least log it if it does.
It's better not to have this method in the public class, even if it
means that we need to pass a wxWebSessionImpl object to wxWebRequestImpl
ctor explicitly now.
No real changes.
No real changes, just use the same name as in the other backends for
consistency (we could also rename m_sessionImpl in the other ones to
m_sessionCURL and m_sessionURLSession respectively, but this would have
been more work and the latter name is really not great).
Although this was supposed to work, specifying "%l" in wxLog time stamp
format actually didn't because wxLog timestamps were stored as seconds.
Fix this by storing them as milliseconds and add a simple test (not
executed by default) showing that "%l" works correctly now.
Still keep the old wxLogRecordInfo::timestamp field for compatibility,
as it was documented.
See #13059.
It's up to the application code to decide how it handles the HTTP status
codes it gets back from server, there is no need to have a special
method for handling them in wxWebRequest itself.
We also shouldn't skip downloading the response body just because it was
unsuccessful, we may still need it (e.g. it's very common to return the
detailed error description in a JSON object in the message body when
returning some 4xx error), so don't do it in wxMSW implementation and
add a test verifying that we still get the expected body even for an
error status.
Also improve wxWebRequest::State values documentation.
Don't give it any tags other than "." as we don't want to execute it
when these tags are specified, only when it's explicitly selected by
using its name on the command line.
Follow the convention of using the event macro names (rather than the
event type) names in @event documentation in wxNotificationMessage
documentation too, e.g. use EVT_NOTIFICATION_MESSAGE_CLICK rather than
wxEVT_NOTIFICATION_MESSAGE_CLICK.
Closes https://github.com/wxWidgets/wxWidgets/pull/2166
Use the hack with __dllinstdir variable just added to bakefile to
override the installation location for the DLLs to put them into the
expected location.
Closes#14601.
Don't use the current locale format which doesn't provide all the
information (e.g. never includes milliseconds) and explicitly set the
format providing it instead when showing wxLogTrace() messages.