Add the bitmap margins to the bitmap size, not the total button size.
This fixes the buttons becoming unnecessarily tall as soon as they were
assigned even a tiny bitmap.
Closes#16536.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The comment didn't correspond to the code since the changes of r62842, the
asserts don't result in an immediate trap now even if they happen in non-main
thread.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78126 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/trunk@78124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a compromise solution between r78040, which handled monochrome bitmaps
correctly, but broke drawing bitmaps without using their mask, and r78054
which simply reverted it: this version preserves the old behaviour when not
using the mask, but draws at least the shape (if not the colour) correctly
for the monochrome bitmaps.
Notice that this also reverts r78039 which is not needed any more without
r78040.
Closes#16512.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Calling SetHICON() is not enough, the icon size already needs to be set or,
even better, CreateFromHICON(), which does both atomically, should be used.
Closes#16672.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxStaticText emulates disabled state on OS X by changing text color to
light grey. When re-enabling the control, though, it always set the
color to the standard text color, which broke static texts with a custom
color.
Fix this by keeping track of the original color and restoring it back
when setEnabled:YES is called.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, but this is more consistent with the other controls.
It also highlights the ports which use non-default style, e.g. wxQt where
wxNO_BORDER should probably not be used as part of default toolbar style but
rather added in the ctor implementation.
Closes#16667.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The actual default styles for the toolbars don't include wxTB_FLAT anywhere,
so don't include it in the (currently almost unused) wxTB_DEFAULT_STYLE
neither.
See #16667.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only unselected wxPG property can be marked as 'being deleted'.
If this is done for selected wxGP property then in some circumstances it cannot be unselected and hence cannot be safely deleted.
See #16617.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use scaled size and scale factor when creating wxMemoryDC so that the
modified output bitmap has same physical dimensions as the source one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxOSX's wxToolBar code uses toolbar size computed by
AdjustToolBitmapSize() to determine which of the builtin toolbar sizes
to use. Because AdjustToolBitmapSize() returned 2x the "logical" size,
it would always pick NSToolbarSizeModeRegular regardless of icon size,
resulting in differently-sized toolbar on HiDPI and low-DPI screens.
Use scaled size instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code for doing this was accidentally disabled in r74957, which intended to
disable it for Darwin, but ended up disabling it for everything but Darwin.
Reenable it for all platforms now, clearly it didn't hurt to have it enabled
under Darwin, and we do need to do it, e.g. see #12636.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxComboBox::Clear() must call wxTextEntry::SetValue() explicitly instead of
calling its Clear() which just forwards back to wxComboBox own SetValue(),
which (correctly) doesn't work for read-only comboboxes when passed an empty
string.
Closes#16654.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This ensures that overridden wxComboBox::Clear() is called even when it's
invoked via a pointer or a reference to wxItemContainer (and not just one
to wxComboBox itself or its other base wxTextEntry).
Closes#16654.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Correct the HTML output format for wxGA_PROGRESS, it was indented incorrectly
because Doxygen appears to need a blank line (i.e. end of paragraph) after a
"@since".
Also improve the wording of the styles descriptions a little.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Documentation generated by @overload is misleading in this case as it refers
to the "different argument [the function] accepts", but there are none, the
methods can be overloaded only by const modifier as well.
Use \copydetails instead to reuse the original documentation, this is less
confusing and arguably more useful as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
GTKReleaseMouseAndNotify(), which is called before showing a modal dialog in
wxGTK to ensure that the mouse does not remain captured by the window which
will be disabled by the modal dialog soon, should update the mouse capture
stack and so must call ReleaseMouse() to do it, not just DoReleaseMouse().
See #16647, #8657.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use a lighter shade of gray to avoid problems with user icons and to
match the look of OS X 10.10's rendering of selected toolbar items.
Fixes#16645.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Opening the font dialog would result in an exception in
RunMixedFontDialog:
-[NSView resetFlags]: unrecognized selector sent to instance 0x6080001285c0
The code in question assumed that NSFontPanel's accessory view either
didn't exist or was created by wx, and casted it to
wxMacFontPanelAccView* without checking. But this assumption is no
longer true on OS X 10.10, the view is apparently pre-set to some
default NSView instance.
Fix the code to check accessoryView's class before treating it as
wxMacFontPanelAccView.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This option, which is on by default unless the use of STL is disabled,
provides better interoperability with the standard library when it can be done
without breaking backwards compatibility.
The first example of its use is to allow passing std::vector<> of any string
compatible type to wxItemContainer::Append(), Insert() and Set(), allowing to
directly initialize various wxControls deriving from it such as wxChoice,
wxComboBox, wxListBox from a std::vector<> of strings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Expand wxStaticText controls in wxBusyInfo and centre them to avoid the
problem with their contents being truncated when using markup under wxOSX.
This should, of course, be fixed in wxStaticText itself, and when it is, this
change should be reverted. But for now this at least allows wxBusyInfo to
appear correctly under OS X.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Until this change the entire last word disappeared, presumably because it was
wrapped to the next line, which was not shown at all. Now as much of it as
fits into the available space is shown, which is not ideal, but better than
before, especially if we're only a pixel or two short.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow customizing wxBusyInfo window by passing wxBusyInfoFlags containing
information about the icon, title, colours and frame transparency to use.
Update the sample to show such "rich" busy info.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775