Commit Graph

59422 Commits

Author SHA1 Message Date
Vadim Zeitlin
c813c30c34 Fix best size calculation for buttons with bitmaps in wxMSW.
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
2014-11-11 01:02:20 +00:00
Vadim Zeitlin
b30f2a8ce6 Remove outdated comment from ShowAssertDialog().
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
2014-11-11 01:02:18 +00:00
Vadim Zeitlin
8b72652a28 Make results of wxDC::DrawEllipticArc() consistent across all platforms.
And also consistent with wxGraphicsContext method with the same name.

Document the rules determining what is drawn.

Closes #4437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 01:02:14 +00:00
Vadim Zeitlin
f9637c9626 Set the initial text value of wxSpinCtrlGeneric correctly.
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
2014-11-11 01:02:08 +00:00
Vadim Zeitlin
dbd22a81e4 Improve drawing of monochrome bitmaps with masks in wxMSW.
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
2014-11-11 01:02:02 +00:00
Vadim Zeitlin
870d9b4cfe Fix size of the icon returned from wxFSVolume::GetIcon().
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
2014-11-10 23:48:40 +00:00
Paul Cornett
c2dacded8a avoid reconfiguring scrollbar when settings are not changing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 17:40:36 +00:00
Paul Cornett
807a3091c0 avoid multiple emissions of the GtkAdjustment "changed" signal when configuring scrollbar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 17:10:35 +00:00
Paul Cornett
a16a0e092d invalidate cached client size when scrollbar visibility changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 16:51:58 +00:00
Artur Wieczorek
cbb28b1f4d Reset current category marker if deleted wxPG property is a category property.
If deleted category or its sub-category is a current category then reset current category marker.

See #16617.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 16:46:16 +00:00
Artur Wieczorek
54c7eb3c56 Invalidate wxPG property and its sub-properties names prior deferred deletion.
If deleted property is a category property then all its sub-properties have to be renamed prior deleting.

See #16617.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 16:41:07 +00:00
Jouk Jansen
dba5aea483 Some implementation of find (i.e. OpenVMS(AXP)) need the != operator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 09:34:32 +00:00
Jouk Jansen
588e0d55b7 Correction for non-precomp compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 06:59:45 +00:00
Václav Slavík
a0fe90c644 Fix wxStaticText::Disable() to respect text color on OS X
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
2014-11-10 06:57:50 +00:00
Paul Cornett
c3596d4591 fix infinite sizing loop with GTK3 when using a non-default target window, closes #16668
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 04:13:18 +00:00
Artur Wieczorek
b2588d907e Remove unused wxPG member variable.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-08 18:17:24 +00:00
Artur Wieczorek
774a58ff20 Use Boolean variable to store Boolean values.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-08 18:12:53 +00:00
Julian Smart
46d4a7d01c Don't take right indent into account twice when aligning lines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 17:32:07 +00:00
Julian Smart
702e83210c Fix a rounding error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 17:13:12 +00:00
Jouk Jansen
df5b5baab3 Implement wxNativeFontInfo::GetStrikethrough() for wxX11 without pango
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 15:14:19 +00:00
Vadim Zeitlin
44bb92ecd5 Use wxTB_DEFAULT_STYLE as default value for wxToolBar style.
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
2014-11-07 14:59:33 +00:00
Vadim Zeitlin
50354a2540 Remove wxTB_FLAT from wxTB_DEFAULT_STYLE.
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
2014-11-07 14:59:27 +00:00
Jouk Jansen
fe443d5392 Fix for compilation of wxX11 without UTF
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 13:22:00 +00:00
Jouk Jansen
04458a61f8 Update compile support for wxX11 on OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 13:17:24 +00:00
Jouk Jansen
47ac6fbd59 Fix compilation for wxGTK1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 13:08:48 +00:00
Jouk Jansen
7d63c9560f Update setup.h for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-05 09:33:05 +00:00
Artur Wieczorek
ed186d3ad8 In 3.0 compatibility mode member variable holding pending delete editor objects is emulated by hash map item.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-04 22:56:12 +00:00
Artur Wieczorek
d6e23dd99b Do not mark selected wxPG property as 'being deleted'.
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
2014-11-04 19:23:01 +00:00
Václav Slavík
642528bf5e Fix simulated toggle in OS X wxToolBar wiht HiDPI bitmaps
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
2014-11-04 16:21:00 +00:00
Václav Slavík
06ddf44a27 Fix wxToolBarBase::AdjustToolBitmapSize() for HiDPI on OS X
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
2014-11-02 16:28:12 +00:00
Vadim Zeitlin
7e96398e63 Restore code for closing inherited file descriptors under non-OS X.
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
2014-11-01 14:00:04 +00:00
Vadim Zeitlin
844159792f Fix clearing wxCB_READONLY wxComboBox in wxGTK.
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
2014-11-01 13:56:30 +00:00
Vadim Zeitlin
03e64f3c20 No changes, just move wxComboBox::Clear() out of line in wxGTK.
Make this function non-inline to facilitate further modifications.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-01 13:56:26 +00:00
Artur Wieczorek
8a971c12ad Fix deleting wxPG properties with sub-properties.
If property contains sub-properties they should be deselected prior deleting the property.

See #16617.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-31 16:04:44 +00:00
Vadim Zeitlin
b1989ee7fe Make Clear() virtual in wxItemContainer base class.
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
2014-10-31 13:19:46 +00:00
Vadim Zeitlin
38016a11ad Fixes to wxGA_TEXT and wxGA_PROGRESS documentation.
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
2014-10-30 12:56:31 +00:00
Vadim Zeitlin
e847a2390e Re-add wxFD_OVERWRITE_PROMPT and wxFD_FILE_MUST_EXIST to wxGenericFileDialog.
Support for these styles was accidentally removed in r48733, re-add them back.

Closes #16652.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-28 18:57:40 +00:00
Vadim Zeitlin
47e8f3e50d Don't use "@overload" to document methods without parameters.
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
2014-10-27 20:09:55 +00:00
Vadim Zeitlin
3a94fbf452 German translation fixes from Sebastian Walderich.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-27 17:36:03 +00:00
Vadim Zeitlin
0c6f5c346d Update mouse capture stack when showing modal dialog in wxGTK.
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
2014-10-27 17:31:03 +00:00
Václav Slavík
454c50929f Use subtler grey for emulated toolbar toggle on OS X
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
2014-10-26 11:44:33 +00:00
Paul Cornett
2b4b8e044b use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-25 18:06:36 +00:00
Václav Slavík
f97112a21e Fix wxFontDialog exceptions on OS X Yosemite
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
2014-10-25 12:49:11 +00:00
Artur Wieczorek
fd9d67e9f4 Get wxPGProperty items to be deleted with deferral directly from the corresponding internal list of items.
Don't use iterator to collect wxPGProperty items in wxPropertyGridPageState::DoClear().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-25 12:35:14 +00:00
Vadim Zeitlin
743aa6d74f More fixes for PCH-less build after r78063.
Add missing headers/forward declarations now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 23:23:10 +00:00
Vadim Zeitlin
fdcf2676f0 Fix typo which broke PCH-less builds in r78063.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-24 22:55:47 +00:00
Vadim Zeitlin
722057b3a0 Add a new wxUSE_STD_CONTAINERS_COMPATIBLY option.
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
2014-10-24 21:54:51 +00:00
Vadim Zeitlin
30c93fd705 Work around bad wxStaticText best size calculation under wxOSX.
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
2014-10-24 21:54:44 +00:00
Vadim Zeitlin
011a1356a8 Clip the last word of wxStaticText if it doesn't fit in wxOSX/Cocoa.
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
2014-10-24 21:54:41 +00:00
Vadim Zeitlin
434c95e1a1 Allow customizing wxBusyInfo appearance.
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
2014-10-24 21:54:38 +00:00