This makes behaviour more consistent across all platforms, as this flag
is always used in wxGTK and wxOSX, and might avoid some problems in
wxMSW, see #23982.
This makes the code more readable and also simpler as RealizeHelper()
only used its boolean parameter to convert it to wxOrientation anyhow
after the changes of the parent commit.
No real changes.
This function used to return bool, but it didn't just always return
true, but it's not even clear how could it possibly fail in theory, so
this was quite useless.
But Realize() itself used GetSize() after each call to RealizeHelper(),
so just make RealizeHelper() itself return this size, which allows to
shorten the code and get rid of a couple of levels of indentation.
No real changes.
This was only used under Mac but defined under all platforms.
Don't bother with defining it elsewhere and just use a trivial empty
lambda as wxEVT_ACTIVATE handler under Mac.
Note that it's not really clear if this is still needed neither, but it
doesn't cost much to keep this workaround just in case it is.
Calling this function from OnInternalIdle() is not always enough, so
call it before processing each and every event to ensure that CEF can
really do whatever it needs to be doing internally.
This doesn't seem to noticeably slow down the program and solves weird
problems, like embedded text boxes (e.g. search zones on the web sites)
not getting focus on click.
This corrects a problem introduced in 11ed91af8f (Add missing default
constructor of wxFileDialog in wxMSW, 2023-12-03) as m_data remained
uninitialized when default ctor was used.
See #24113.
wxIntProperty::DoValidation() overloads for wxLongLong_t and wxULongLong_t
parameters are not supported because for these types there are no direct
conversions to wxVariant.
Arguments of such types will be handled by overloads for wxLongLong
and wxULongLong.
This code was already used for Ctrl-C handling, refactor it into a
separate function that can be called from the application now.
This commit is best viewed with --color-moved-ws=ignore-all-space Git
option.
Closes#24124.
Although wxGenericTreeCtrl is not used under MSW by default, it still
doesn't hurt to adjust its metrics when DPI changes there.
Note that this shouldn't be done for the platforms using DIPs.
The icons positioning was broken by 53b4f4ddf2 (Use physical size in
wxImageList, 2023-11-03) because the logical size was calculated
incorrectly in the case when wxImageList was used for the icons and
ended up being 8x8 for 16x16 icons when using 200% scaling, which was
clearly wrong and resulted in the icons not fitting in the space
allocated for them because they actually took 32x32 physical pixels due
to scaling of all bitmaps from wxImageList.
Fix this by correctly taking account of the window DPI scale factor.
This is a bit roundabout because using FromPhys() later just undoes
this, but it allows to keep using the same code when using wxImageList
and wxBitmapBundle for storing bitmaps and so is simpler.
Note that we must only do this when wxImageList was provided by the
user, i.e. with the legacy code, but not when it was created internally
in addition to wxBitmapBundle, as in this case we recreate it on DPI
change using the correct, DPI-adjusted size, already, so restrict this
scaling to the case when we don't have wxBitmapBundle only.
This commit is best viewed ignoring whitespace-only changes.
This parameter was always "true" in the existing calls to this function
and the underlying UseClippingView() didn't support passing "false" to
it anyhow, so it seems simpler and more clear to just remove the
parameter.
It also avoids clang warnings about it being unused.
No real changes.
This fixes warnings about MAC_OS_X_VERSION_11_0 not being defined when
using older SDKs, as 21da0e128d (Change wxRendererNative to use
NSCell-based methods under Mac, 2023-11-12) used a wrong name for the
version constant: since macOS 11 these constants don't use "X" in their
names any longer.
Remove this and add a comment to the place where we define them to
document this not quite obvious naming convention.
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 is not necessary and, more importantly, results in a crash if you try
to recreate the status bar (which can be seen in the statbar example)
Also remove leftover QList declaration
This includes a static function to calculate Easter that can be used for
other authorities.
Document the wxDateTimeWorkDays and wxDateTimeHolidayAuthority classes.
Closes#24094.
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.
Fix wxBitmapBundle::FromSVG(), which renders incorrectly on GTK and add
wxHAS_PREMULTIPLIED_ALPHA to make the code dealing with alpha more clear
and correct.
See #24097.
We need to use a native clip view for things to behave correctly under
this OS version, otherwise scrollbars can be overdrawn by the window
contents.
Closes#24067.
Closes#24073.
And do nothing in this function if the arguments had been already
initialized, as it will make it more convenient to call from other
places.
No real changes.
This function is always called, even if the application prevents the
wxEVT_IDLE handler from being called, either by forgetting to Skip() the
event in its own handler of this message or by changing the global idle
event generation mode to wxIDLE_PROCESS_SPECIFIED.
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.
The problem was: wxClientDC draws in a QPicture owned by the DC. In the destructor,
QtPictureSetter sets the picture to be used by the associated window and generates
a paint event, then resets the picture when it goes out of scope before the paint handler
has a chance to replay the image. In this commit, this setup is changed so that window
owns the picture instead and is responsible for deleting it when it is actually used.