Make sure we are not neglecting the layout insets, for controls like
button, choice and gauge, otherwise client sizes became larger than
control sizes.
Closes#18717.
Use custom subclass for native static bitmap, to ensure that we call
wxOSXCocoaClassAddWXMethods() for it.
This notably allows to get mouse click events for this control.
Closes#18545.
This has been broken by the wrong test added in 13b0981eb9 (Get rid of
WXCONFIG_ONLY_CPPFLAGS variable in configure, 2020-02-02), which was
always false because it tested literal "SHARED" instead of the value of
the variable with this name.
This went unnoticed because WXUSINGDLL is not really necessary anyhow
under Unix, but it broke the build of any project building MSW binaries
using wx-config.
Fix problem with wxUSE_HTML added in 05cce8d89d (Add wxUSE_HTML check to
wxHtmlListBox header, 2020-05-28) not being defined when this header is
the first one to be included.
We must always change the text colour when using non-default background
colour, as otherwise the text may become unreadable in some themes,
which was exactly what happened in the standard "High contrast" theme
when using wxAUI under MSW before.
Closes https://github.com/wxWidgets/wxWidgets/pull/1989Closes#18832.
This was recently broken in 3bcbc8fe8e (Implement dismissal for
unfocused wxPopupTransientWindow, 2020-07-09) as the changes in it
resulted in the popup being dismissed as soon as it was opened with a
mouse click.
Fix this by changing several things:
- Check for wxCurrentPopupWindow before processing the message, not
after, as the message handler itself could create a new popup and we
definitely don't want to dismiss it immediately after its creation.
- Check for mouse DOWN events only, not UP and DBLCLK ones, as otherwise
it might be possible that UP matching the same DOWN whose handler
showed the popup would dismiss it. As for DBLCLK, it's just
unnecessary, as it should be always preceded by a DOWN message anyhow.
- Don't dismiss the popup if the message is sent to it or one of its
children, as in this case the popup itself is supposed to deal with it
(as wxComboCtrl popup does) and we don't want to prevent it from doing
it.
With these changes both wxComboCtrl and wxTipWindow seem to work as
expected.
Closes#18844.
Reimplement the logic of 16a02e6338 (Use DPI independent text size in
wxSVGFileDC, 2019-08-06) without using GetContentScaleFactor(), but
using wxDC::GetPPI() directly and do it under the platforms not using
logical pixels only.
This makes the units correct again in SVGs produced when using high DPI
under MSW even although wxDC::GetContentScaleFactor() now returns 1 in
this case.
Enable and fix keys processing in wxSymbolListCtrl::OnKeyDown().
Also set focus to this control initially as it's more useful and it's
expected that cursor arrows can be used to move the selection in it
rather than changing selection in the font comboboxes.
Note that "Enter" key still doesn't work correctly, i.e. doesn't close
the dialog when it's pressed in the symbols list control.
Closes#16033.
Co-authored-by: Igor Korot <ikorot01@gmail.com>
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
wxGCDC is often used from wxEVT_PAINT handler and showing an assert
dialog from any of its methods results in wxEVT_PAINT being generated
again, resulting in another assert and abort, which is not useful, so
remove this assert to at least avoid crashes whenever unsupported
logical function is used, as it happens e.g. in the "Mask Screen" of our
own drawing sample.
Fix the problem of the access-denied error when using a 'new
window.ActiveXObject("Microsoft.XMLHTTP")' to access URIs from custom
WebView scheme handler of the Internet Explorer WebView.
The solution here is to implement PARSE_SECURITY_URL and
PARSE_SECURITY_DOMAIN in ParseUrl of the IInternetProtocolInfo interface
of the Internet Explorer Control.
The direct implementation of VirtualProtocol::QueryInterface() instead
of using IMPLEMENT_IUNKNOWN_METHODS works, but is not nice. The better
approach would be probably enhancing ADD_RAW_IID to support multiple
inheritance.
Closes#17893.
This reverts commit b0152155c0.
After changing wxWindow::GetContentScaleFactor() to return 1 on
platforms without logical pixels, such as MSW, in the grandparent
commit, make wxDC::GetContentScaleFactor() consistent with it too.
Although caller of wxWebViewEdgeImpl::GetSettings() check if it returns
NULL and handle it gracefully, this function itself can crash if it's
called too early, i.e. if ICoreWebView2 hasn't been created yet.
Add a check to avoid this and just return NULL settings in this case.
Closes#18840.
It has become unnecessary after the previous commit, as now the generic
GetContentScaleFactor() can be used instead of it on all platforms, so
revert the changes of f6cc8ff52c (Add GetOpenGLScaleFactor() to abstract
OpenGL coordinates scaling, 2020-07-10).
See https://github.com/wxWidgets/wxWidgets/pull/1944
See #17391.
This reverts bc492a9e6e (Make wxWindow::GetContentScaleFactor() useful
for non-OSX platforms., 2015-03-18) and restores the old behaviour from
wxWidgets 3.0, which consisted in only returning factor different from 1
from this function for the platforms distinguishing logical and physical
pixels.
After this change, the return value of this function can be portably
used on all platforms to convert between logical and physical pixels,
independently of the current DPI.
This function replaces some uses of GetContentScaleFactor(), where a
factor greater than 1 must be used even under the platforms not doing
any logical/physical pixel mapping, such as MSW.
For now GetContentScaleFactor() is still unchanged, but it will return 1
for such platforms in the future and adding GetDPIScaleFactor() allows
to avoid changing the behaviour of the code which relied on its current
behaviour.