Provide a way to retrieve the name of the current system appearance
(mostly for diagnostic purposes) and check if it uses predominantly dark
colours.
Currently this class has a non-trivial (but still very simple)
implementation under macOS only and simply checks whether the default
text colour is brighter than the default background colour under the
other platforms, but other platform-specific implementations could be
added later.
Also update the drawing sample "system colours" page to show the system
appearance as well.
wxPropertyGridManager::DoSelectPage() returns true also if new page is
the same as the current one so we have to use alternative way to check
whether we really switched to the new page.
Because changing some attributes of the property affects the format
of displayed value so the property has to be refreshed whether its
attribute is set through wxPGProperty::SetAttribute()
or wxPropertyGridInterface::SetPropertyAttribute().
Closes#18388.
This commit removes an attempt to initially hide a frame which was
unnecessary since frames are initially hidden by defautlt, removes an
unncecessary destructor that only performed actions that would happen
anyway, and replaces a Freeze/Thaw pair with wxWindowUpdateLocker.
Using QFont::AnyStyle could result in some completely inappropriate font
being chosen, try using QFont::SansSerif style hint to select a better
font by default.
Closes#18237.
For some reason, 7f10d1fa8a handled
wxSYS_CARET_ON_MSEC and wxSYS_CARET_OFF_MSEC differently in wxGTK, even
though it looks like they should be handled in exactly the same way.
Change the code to do this, which results in returning 0 for the former
setting if the caret doesn't blink at all, just as was already the case
for the latter one.
See https://github.com/wxWidgets/wxWidgets/pull/1285
See #17629.
The documentation stated that (a) wxSYS_CARET_{ON|OFF}_MSEC settings
were not supported on MSW and (b) if a setting was not supported a
negative value was returned. However, when calling
wxSystemSettings::GetMetric(wxSYS_CARET_{ON|OFF}_MSEC), not only the
method asserted but 0 was returned instead of a negative value.
Fix this by using the value returned by ::GetCaretBlinkTime() for
wxSYS_CARET_{ON|OFF}_MSEC.
The documentation for wxSYS_CARET_TIMEOUT_MSEC does not list any
platform limitations; however, attempting to obtain this value resulted
in an assert and 0 returned. Fix this by returning -1. Returning -1 may
not the be the ideal solution, but there is no value reserved for the
setting not being supported and the caret on MSW usually blinks.
Closes https://github.com/wxWidgets/wxWidgets/pull/1285
This removes irregular behaviour in setting the label of a control. Creating
a control with label now behaves the same as setting or changing the label
later on. And behaves the same as for other tools in the wxToolBar.
Closes https://github.com/wxWidgets/wxWidgets/pull/1289
The advantage of using this compiler builtin instead of our own platform
checks is that the compiler will warn us (if -Wunguarded-availability is
turned on for APIs introduced before 10.13 or by default for later ones)
if a check is forgotten, which is not the case for the manual checks.
Update the code to use WX_IS_MACOS_AVAILABLE() macro, which expands to
__builtin_available() when supported, and also use API_AVAILABLE() where
it makes sense to avoid having too many checks.
We don't support macOS versions earlier than 10.7 any longer, so there
is no need to check for 10.7 during run-time and all the code checking
for the resize box presence can be completely removed as, according to
the preexisting comment, the resize box is never present in the
currently supported versions.
The values we check for are elements of AVPlayerItemStatus enum and not
AVPlayerStatus, so use the correct type for the variable.
This actually doesn't change anything and the enum elements have the
same values anyhow, but the code makes more sense now and avoids
-Wenum-compare-switch warnings from Xcode 10 compiler.
Under GTK+ 3 wxSpinButton (being a part wxSpinCtrl editor) is always
displayed horizontally and its minimal width is greater than 18 pixels
so its best width has to be left unmodified and we can only attempt
to fit its height to the height of the wxSpinCtrl property cell.
For other ports wxSpinButton can be displayed vertically and scaled as
necessary.
Closes#18385.
Don't assume that all the items (except for the controls) have the same
size in wxToolBar::DoGetBestSize(), this is manifestly not true at least
for the separators and resulted in too much space left over at the end
of the toolbar.