wxWindow::GetContentScaleFactor() always returned 1 before the window
was shown in wxGTK, which was rather annoying as typically icons are
initialized on application startup, i.e. before showing the windows, and
so the wrong scale factor was silently used for them.
ChangeValue() must not send events, but did in wxGTK when changing the
contents of a wxTextCtrl to be empty when it had been non-empty before.
Closes#18264.
Neither GetWidth() nor GetScaledWidth() (nor the corresponding
height-related methods) can be called if the bitmap is invalid and the
resulting assert led to a crash when it happened in wxAuiToolBarArt
drawing code, as it was triggered on each redraw.
Just use bitmap size of (0, 0) if we're not going to draw it anyhow.
Closes#18263.
Don't skip MakeFromTimeZone() for the current time zone, this is still
necessary.
Fixes a failure in the unit tests when running during a DST period with
TZ=Europe/London, for example.
Closes https://github.com/wxWidgets/wxWidgets/pull/966
RefreshRow() is called very frequently, and in particular after every
ItemChanged notification. Calling GetEndOfLastCol() in it repeatedly is
extremely inefficient in presence of auto-sizing columns, and doesn't
make much sense anyway - controls with significant space unoccupied by
columns are rare, and rendering of such unused space is efficient (just
background erase). It is therefore more performant to simply refresh
the entire row instead of repeatedly and expensively calculating the
smallest rectangle that needs repainting.
Fixes previously wrong calculation of the refreshed rectangle in
RefreshRows() in the process.
Fixes major performance regression introduced in
77c7c80696.
Closes https://github.com/wxWidgets/wxWidgets/pull/970
Cache labels for "Next>" or "Finish" button in wxWizard so that their
translations stay consistent throughout wizard's lifetime: previously,
this button could use a label in a different language if the currently
used translations have changed since the wizard creation, as this label
was recreated on every page change, unlike the other labels which were
only translated once in the very beginning.
Closes https://github.com/wxWidgets/wxWidgets/pull/1000
Under macOS colors can be patterns, then accessors for RGB values are useless, IsSolid returns true if the color can be expressed in RGB values at all.
This is not necessary as wxIcon is implicitly convertible to wxBitmap
anyhow, so calling Add(icon) works using the existing Add(wxBitmap)
overload, and is actually harmful because of the wrong icon size check
in this function, which used physical bitmap size instead of the logical
(scaled) size.
Closes#18188.
Comment stated that InsertionPoint() didn't pass, but it was actually
already running (and passing) and the only excluded test was the
TextChangeEvents() one which really should pass for multiline controls
as well, so run it too.
Reimplement wxCheckOsVersion() to use wxGetOsVersion() on windows.
An executable without the Windows 8.1+ compatibility info in a
manifest would not detect the version based on the VerifyVersionInfo()
API previously used.
Closes https://github.com/wxWidgets/wxWidgets/pull/992
Surprisingly, ::SuspendThread() doesn't actually do it, but only
schedules the thread for suspension in some undetermined near future.
This could result in problems as Pause() could exit, releasing the CS
protecting wxThread internal data in the main thread, and allowing the
worker thread to enter it (e.g. in its TestDestroy()) before being
actually suspended, meaning that the thread got suspended inside a CS,
which resulted in later deadlocks.
Fix this by calling ::GetThreadContext() which is supposed to ensure
that the scheduler does really suspend the thread before it returns (as
it's impossible to get the context of a thread while it's running).
Closes#18137.
Reimplement wxPopupWindow using WS_POPUP instead of WS_CHILD window in
wxMSW as the new approach allows using the controls inside the popup
normally, unlike the old one.
See https://github.com/wxWidgets/wxWidgets/pull/986Closes#18243.
This will just hide the window immediately, so prefer to ignore the
"focus" argument of Popup() but show the popup instead.
Update the documentation to mention that setting focus outside of popup
is not supported under all platforms.
This fixes another bug from 3518f1a7d8
(after the one fixed in 5766280311): if a
window was maximized by user and then hidden, its IsMaximized() returned
false because it examined m_showCmd which didn't have SW_MAXIMIZE value
in this case.
The same was true for IsMinimised() as well.
Fix both problems by updating the value of m_showCmd when hiding the
window.
Calling Set() resets the existing items order, which makes sense from
the implementation point of view, but not necessarily expected by the
users.
See #18262.
It is no use adding it to the generated setup.h because this section is commented out,
so add it as compiler option instead.
The default option is 'Default' in which case no compiler option is added.
Always set a value to ICONV_CONST so it will be defined in setup.h.
Add a check for strtoull to prevent a macro redefined warning.
Link with WebKit framework to fix macOS build with wxUSE_WEBKIT.