This is similar to wxAuiManager::AlwaysUsesLiveResize() and does the
same thing, i.e. returns true if live update is always used, whether
wxSP_LIVE_UPDATE is enabled or not.
Use the new function in the sample to disable the menu item in the
environments where it doesn't do anything, as it was confusing to have
it under e.g. Wayland.
Because some pages in the sample contain too much content to fit entirely
in the visible area of the page. Under wxQt port, this is true regardless
of the state of the window (whether it is maximized or not) some content
remains hidden and inaccessible.
Closes#24154.
Postpone the creation of the QStatusBar fields until the first call to
SetStatusText(). This is to account for any field control added by the
user and also to avoid having to call UpdateFields() multiple times.
wxSTB_ELLIPSIZE_XXX and wxSTB_SHOW_TIPS supports are also implemented now.
The statbar sample is also updated: The OnSize() handler is removed because
it doesn't do much. that is: it is defined to keep the bitmap centered in the
status bar field it occupies if it is resized. but this is already done by the
wxStaticBitmap control, at least under wxMSW, wxGTK3 and wxQt.
This allows user codes to simply designate where their controls should
appear in the status bar without the need to handle wxEVT_SIZE
themselves.
They can still handle the event if the default positioning does not meet
their needs, but the new API is simpler and can be implemented for wxQt.
Closes#24092.
All previous relevant platform-specific tests have been changed to use this
symbol. Also, samples/image now premultiplies conditionally, correcting a
visual anomaly on wxGTK.
Add these functions for consistency with SetStateImages() and to avoid
using GetStateImageList() in the treectrl sample, which can now use
GetStateImageCount() instead.
Unlike the existing SetStateImageList() function, the new one allows to
provide the high-resolution versions of the state images too.
Update the treectrl sample to use the new API.
Closes#23993.
Adjust it to the DPI as it was way too small at 200% scaling.
Also stop passing parameters to MyFrame ctor, it's only used once so we
can just as well hardcode them in it to simplify things a little.
The Clear log and Exit buttons were not shown after the changes
in a69fabe (Fix using wxStaticBoxSizer in samples, 2023-10-22).
Fix this by creating them with the proper parent.
Closes#24005.
Closes#24007.
If a control is contained in a wxStaticBoxSizer or its child sizer,
wxStaticBoxSizer::GetStaticBox() should be used as the control's parent.
However, widgets and dialogs samples did not do that, which resulted in
flooding the message log in widgets sample with warnings about this; in
dialogs sample the warnings were shown in the debug output.
Fix this by always using the static box as the control's parent when the
control is contained (directly or indirectly) in a wxStaticBoxSizer.
Closes#23967.
Having this line is not useful at all as it doesn't contain any
information and shouldn't be filled in the future as git-shortlog can
provide the information about people who changed the given file more
more reliably than consulting the comments in any case.
Keep the non-blank lines for historical purposes.
The gestures frame created its own log target and deleted
the previous one but did not restore it when being closed.
This left the current log target invalid which led to a crash
when calling any wxLog*() function after gestures frame was closed.
Fix this by restoring the previous log target when gestures frame
is closed.
Closes#23767.
See #23881.
Add support for specifying multiple animations to allow automatically
showing a higher resolution version when using high DPI, just as it was
already possible with the bitmaps.
See #23817.
When testing downloading with wxURL and header Content-Length
is not available, display "n/a" as the file size instead of
the value of (unsigned long)-1.
Closes#23825.
Allow specifying multiple animation versions, for different resolutions,
when setting the animation to use via wxAnimationBundle class which is a
much simpler version of wxBitmapBundle used elsewhere.
This is not implemented for the native GTK version yet.
Update the sample, even though the difference in it is not really
noticeable as the "high DPI" throbber is just a scaled up version of the
existing standard DPI animation produced using gifsicle.
Instead of always scaling the single bitmap passed to it, allow passing
wxBitmapBundle and select the bitmap most appropriate for the current
resolution from it.
Closes#23813.
This reverts 5d630caabd (Make it enough to predefine only
wxUSE_DPI_AWARE_MANIFEST, 2023-08-23) and all the commits which tried to
fix the breakage caused by it.
While the original change had merit, it seems to be too difficult to fix
all our build systems to avoid embedding manifest when defining this in
the code, like samples/sample.rc does, so revert this change for now.
Maybe it can be reintroduced in the future after switching to some other
build system.
This clashes with the wx manifest which is getting included now after
the changes of 5d630caabd (Make it enough to predefine only
wxUSE_DPI_AWARE_MANIFEST, 2023-08-23).
- caret: Use the system color for window background instead of
hard-coded white.
- image: Use hard-coded black for the text drawing since all other
drawings on the image canvas use hard-coded colours too. The default
text colour was barely readable in dark mode.
- joytest: Use wxCYAN_PEN instead of wxBLACK_PEN to ensure the line is
visible both in light and dark colour system mode.
- ownerdrw: Use such background colour that there is good contrast
between text and background both in light and dark colour system mode.
- popup: Use such background colour for the pop up so that there is a
good contrast between text and background both in light and dark
colour system mode.
Closes#23773.
In the dialog, create the controls put in the static box sizer
with the sizer's static box as the parent instead of the dialog.
Improve appearance of custom drawn items in dark mode.
Closes#23765.
"base" library must always come last in the samples bakefiles as the
list of wx libraries to link with is generated when processing it, so
putting the "net" library after it had no effect.
See #23723.
This sample is the only one to use a GLU function too.
It would probably be better to drop GLU dependency entirely, but until
this is done (see #23721), do link with it.
This commit is best viewed ignoring whitespace-only changes.
Previously this was never done, as we couldn't determine if we were
using Cocoa or not at generation time, but we can determine it in the
makefile itself.
This samples used "wx_append" in its bakefile, but should be using
"wx_append_base", as it's a console application.
This fixes its build with makefile.unx, as wxUSE_GUI wasn't properly
defined as 0 before.