Don't check for the key existence, it ought to exist if we create it like
this.
Also don't allocate wxRegKey object on the heap unnecessarily.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Hopefully not using WXDLLIMPEXP_CORE here should fix VC6 warnings about using
non dll-interface class as a base class for a dll-interface one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Move wxUIActionSimulator implementation files to low level sources to ensure
that they are included in wxUniv builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is unnecessary and resulted in too high buttons in some cases for buttons
with images. As we increase the button height to at least the standard value
later in all code using function anyhow, it's not necessary to do anything
with the height inside it.
Now the buttons with an image get the same height whether they have the text
or not.
This change also gets rid of (completely arbitrary) decision to use 11/10 of
the label height when computing the fitting button size and it's always nice
to get rid of dirty hacks like this.
Closes#12924.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We used to increase the button size to the standard size first and then add
the extra padding the buttons with images. This resulted in too much padding
for the buttons with short text labels and images.
Instead, add the padding for the image first and only then increase the button
size to the standard one if still needed.
See #12924.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For some reason wxXPButtonImageData added (big) margins around the button by
default resulting in too much padding. Simply remove these margins to make it
behave similarly to wxODButtonImageData.
See #12924.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method should only be called if we do have an image, assert (instead of
silently returning) if it's called when we don't.
Also explain in a comment why do we need to call CacheBestSize() only when we
have an image in DoGetBestSize().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
XGetWindowAttributes() used in this function resulted in link problems under
Fedora 14 because we don't explicitly link with libX11. Instead of doing this,
simply get rid of this function as it seems to be used in exactly one place in
wxX11 code only anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If the shortened text is so short there's nothing left of the original,
show one character and "...". This is standard behaviour on both
Windows and OS X, in addition to making lot of sense.
Fixes#11360.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Width calculation using partial extents is just an inaccurate
estimate: partial extents have sub-pixel precision and are rounded
by GetPartialTextExtents(). Use partial extents to
estimate string width and only verify it with GetTextExtent()
when it looks good.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If the allowed width is so small that nothing reasonable can fit it,
overlap it. Ellipsized text must always contain "..." to indicate that
it was shortened, it isn't acceptable to omit it.
See #11360.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It doesn't make sense to attempt to shorten 1 character long string, so
don't do it. Note that 2 characters strings may be shortened (consider
e.g. "mm" in some typefaces).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When ellipsizing kicks in, the text is much shorter than the available
space -- there's a "safety margin" of one character's width that is
always left unused. This appears to be some kludge that worked around
algorithm defects, not something that should really be needed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The mouse was not positioned over the URL in this test so clicking it didn't
work. Tweak the offset to make it pass but it would be better to have some
more fool-proof way of finding the real position of the text in the control.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Numeric validator tests rely on wxLocale::GetInfo() returning the decimal
point and calling setlocale() is not enough to ensure this under MSW, we must
use wxLocale for this currently.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This completes the changes of r64414 and also removes the extraneous "MOUSE"
from the event types listed in the wxMouseEvent ctor documentation.
Closes#12095.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The tree control style used by Explorer uses rotating triangles instead of the
standard "+/-" buttons and so seems to correspond relatively well to this
style. And this provides a possibility to have a more standard-looking tree
controls in wxWidgets programs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove wxUSE_COMCTL32_SAFELY that hasn't been needed for years, the current
code seems to work just fine on all the systems so remove this obsolete
workaround to simplify it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
PNG images are used by the main wxWidgets library itself now and so linking
with the monolithic wx library introduces dependencies on PNG as well, even
for the console applications. Link them with linpng to avoid linker errors.
Closes#12889.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Wrong multiplier was used for the most significant byte. Fix it even though it
doesn't risk to be a problem in practice as the images of such gigantic size
would surely break some limit anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Handling of WM_{ENTER,EXIT}SIZEMOVE was disabled as a side-effect of r47927,
possibly unintentionally. Revert this change to generate these events again.
Also document that they're MSW-only for now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code in wxMSW menu code which accounted for the extra items used to show
popup menu title has become incorrect since the changes of r66178 as now the
non-popup menus have titles as well.
Correct the check to only do the adjustment for the popup menus.
Closes#12922.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This parameter was never needed nor properly documented. Simply remove it from
SetTickFreq() and keep the overload still taking it for backwards
compatibility only.
Closes#12907.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775