Second click can result in a double click event instead of the usual simple
click if it happens quickly enough after the first one, so handle double
clicks in the same way as simple clicks instead of ignoring them.
Closes#16551.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The cached widths need to be invalidated whenever an item is expanded or
collapsed, whether it's done programmatically (which was already handled) or
interactively by the user (which wasn't).
Closes#16678.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The text control was left empty if the string value was not specified, but
it should use the numeric initial value instead in this case.
This notably affected wxSpinCtrlDouble under non-GTK platforms.
Closes#16621.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Creating the status bar before the menu bar but associating it with the frame
after creating the menu bar resulted in a status bar of completely wrong height.
Fix this by enforcing the default height on the status bar when it's attached
to the frame.
Closes#10956.
[This is the backport of r76417 from trunk.]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ended up being broken due to an interplay between different unrelated
changes (at least r15120 and r41134) which were both correct, but didn't work
well together and resulted in not only preventing IsDialogMessage() from
handling ESC, but also our own accelerator tables.
Fix this by doing the check for IsDialogMessage() brokenness in
MSWProcessMessage() itself, just before calling it, instead of doing it in
MSWShouldPreProcessMessage() which is (and must be) called before
MSWTranslateMessage() which checks for accelerators using ESC.
Closes#3813.
[This is the backport of r77071 from trunk.]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use mask and alpha together, this results in visual artefacts and masks
are unnecessary with RGBA bitmaps anyhow.
The only potentially problematic remaining case is mixing bitmaps with alpha
and mask inside the same image list (as we need to indicate whether we use the
mask or not when creating it), but this should probably be rare and in the
meanwhile we can at least RGBA bitmaps with image lists, which includes doing
this implicitly when they are used as button bitmaps.
Also refactor wxBitmap code to extract part of CopyFromIconOrCursor() to allow
reusing it in the newly added MSWUpdateAlpha().
See #11476.
[This is the backport of r75567 from trunk.]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Override DoGetBestClientSize() instead of DoGetBestSize(), as we're really
computing just the size of our contents and like this we don't need to hard
code platform-dependent border sizes in this control itself.
Also use the client size in LayoutControls() for the same reason. This also
makes it unnecessary to pass it the width and height as it can find them on
its own. And x and y were never used in the first place, so remove them too.
Finally, center the bitmaps vertically.
Closes#16422.
[This is the backport of r77083 from trunk.]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use position, not the ID, to find the native menu items to allow the code in
wxMenuItem::SetItemLabel() and DoSetBitmap() to also work with submenus and
not just the normal items.
Closes#16246.
[This is the backport of r76676 from trunk.]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxFileName::MakeRelativeTo() is only supposed to change the path of the file,
not its name, but it was doing the latter for the shortcuts as it implicitly
resolved them to the name of their target.
Fix this by ensuring we do not use wxPATH_NORM_SHORTCUT in MakeRelativeTo().
Closes#16239.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If it isn't, the function doesn't risk to work. This is especially pernicious
because OLE is initialized on startup in GUI applications, but not in the
console ones only using wxBase, so this function can, completely unexpectedly,
give different results in them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure that the order of stops is consistent with the documentation and other
platforms behaviour, i.e. they are counted from inside to outside of the
circle and not vice versa, which happens to be the GDI+ convention.
Closes#16443.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Passing an invalid initial directory to wxDirDialog resulted in using the old
style Windows directory selector dialog instead of the new style (file dialog
like) one, which was unintentional, as incorrect initial directory shouldn't
prevent the dialog from being shown.
Fix this by handling ERROR_FILE_NOT_FOUND error specifically and still showing
the new dialog, just without the (non existent) initial directory value, in
this case.
Closes#16430.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxCommandEvent::GetString() could return empty string for the
programmatically-generated wxEVT_TEXT events from a wxComboBox.
Fix this by extending the on-demand string retrieval in wxCommandEvent to
wxComboBox as well (it was done only for wxTextCtrl).
Closes#3901.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Similar to wxNotebook but even simpler as wxSimplebook doesn't use images.
Also add wxSimplebook::Create() as the version inherited from wxBookCtrlBase
didn't _quite_ work: we need to add wxBK_TOP style to prevent asserts due to
unknown alignment in the base class when creating wxSimplebook.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Update the bounding box in all the methods drawing something. This wasn't
done before in many of them, resulting in the bounding box remaining empty,
but it is updated now and a new test checking that it is was added.
Closes#12904.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Handle WM_CTLCOLOR correctly for them, this wasn't done before because the
code assumed that sub-windows (i.e. HWNDs which belong to the same logical wx
control) were always children of the main window, but they could also be its
siblings (like in at least the two above mentioned cases).
Account for this case in wxControl::DoMSWControlColor() too now.
Closes#12271.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is similar to r76093 for wxGenericTreeCtrl and fixes a similar problem:
clicking in a wxListCtrl inside wxNotebook confused GtkNotebook mouse tracking
logic because it didn't get some events.
Closes#16365.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes problems with parallel builds in Visual Studio 2012 or 2013 IDE as
multiple projects may try to copy setup.h file at once, resulting in errors.
Use _custom_build project as a common dependency to ensure that the copy step
is done only once.
This is a backport of r76419 from trunk, see #16177.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Check for the length of the buffer to determine whether the conversion failed
instead of checking whether it's NULL because this is currently never the case
because of the code in wxString::AsCharBuf() which returns "" and not NULL in
case of conversion failure.
This at least eliminates silent data loss when saving data that can't be
converted to the current locale encoding.
Closes#16348.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This doesn't work if the global C++ locale had been changed and we can't call
imbue(locale::classic()) to ensure that the stream we use here uses the C
locale because imbue() is hopelessly broken in some implementations.
So just get rid of this code and keep only the hack replacing the decimal
separator with the dot explicitly. This is ugly but should always work in
practice and is also consistent with ToCDouble().
Closes#16343.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775