Using "argc" and "argv" for parameter names triggers C4458 with MSVS
2022, warning about hiding class members with the same names.
As we can't rename the latter, rename the parameters to avoid this.
Use the same argument name as in the actual code in the class
constructor as well as the convenience function, instead of
wrongly copypasted "book".
See also 33de6dc (Fix confusing wxPersistentTLW ctor argument name,
2023-12-22).
Closes#24158.
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.
Missing semicolon on latest method addition causes doxygen parsing
issues which in turn causes problems for dependent projects like wxRuby
and wxPython.
Closes#24155.
This resulted in at least a use-after-free ASAN warning and possibly
actual memory corruption, so ensure that we unlock m_devMode before
freeing and resetting it.
Closes#24146.
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
As there is more then one ctor since 11ed91af8f (Add missing default
constructor of wxFileDialog in wxMSW, 2023-12-03), this code would need
to be duplicated in the default ctor too now, but it seems simpler and
more logical to move it to the dtor instead.
See #24113.
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.
Restore the macro removed in 0d6f2f2b85 (Remove wxSuffix from MSBuild
files, it's always "u" now, 2022-10-28) as it can still be used in the
user projects importing wx properties files and it doesn't cost anything
to keep it.
Append the new line character only before starting the next line instead
of doing it after each line to avoid having it when there is just one
line, as this as unexpected when copying a single cell.
Closes#24139.
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.
Do not check for hasMouseTracking in QtGetCurrentState as mouse tracking
is always enabled in any widget derived from wxQtEventSignalHandler.
This resulted in an QtGetCurrentState reporting State_Current when it
should have reported State_Normal i.e. the button showed hovering state
when it was actually not hovering.
After the change, button state will show State_Current only if the mouse
pointer is actually hovered on the button.
Closes#24129.
Closes#24132.
Normally such windows should be remain on top of all the other windows,
but at least under Wayland they do not, so make them at least remain on
top of their parent window -- which should do no harm anyhow and might
do some good (by allowing the WM to associate them with the correct
window) even if they do stay on top of everything.
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.
Remove some code deciding to add 10% of line height between the lines
starting from the arbitrary cutoff of 30px, which was there ever since
f2593d0dda (Calling a Refresh() before the window is created no longer
gives an assert. ..., 1999-12-28) and just add 2 DIPs instead.
Also use FromDIP() for the extra space added to GetCharHeight().
Indent and spacing values were reduced back in 618a5e382a (Applied
Greg's patch to tree control and related., 2001-08-18) compared to the
defaults of 15 and 18 pixels respectively, but only when not using
wxTR_NO_LINES style.
There doesn't seem to be any good reason to for these values to depend
on the style, so use the smaller values always, as they look better and
notably don't result in a lot of blank space between the branch toggle
icon and the image when using images.
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.