Commit Graph

64887 Commits

Author SHA1 Message Date
Thomas Pointhuber
d173ccdb96 Add additional informations stack in wxDebugReport
Always add offset and address of a stack element, even if there is no
symbolic function name, as this can still be helpful. If possible add
module as well.

Closes https://github.com/wxWidgets/wxWidgets/pull/940
2018-09-20 23:23:53 +02:00
Maarten Bent
7a8e314736 Fix clicking on drop down button in wxAuiToolBar on wxMSW
The code handling the mouse events assumed the drop down button with was
10px, but wxAuiMSWToolBarArt uses a different width (14px). So clicking
on the left-most 4 pixels was not registered as a drop down click.

Allow the get (and set) the width of the drop down button of the
ToolBarArt.

Increase the detection area for drop down events, because the drop down
button is drawn 1 pixel larger than the actual size.

Rename some variables where dropdown was used instead of overflow.

Closes https://github.com/wxWidgets/wxWidgets/pull/939
2018-09-20 23:23:53 +02:00
Mick Phillips
8a2dd7f18e Check for success of registry operations in wxJoystick code
Avoid reading wrong registry keys of REGSTR_VAL_JOYOEMNAME is not
available.

Closes https://github.com/wxWidgets/wxWidgets/pull/938
2018-09-20 23:23:53 +02:00
Václav Slavík
81ef669c6d Fix wxPreferencesPage rendering in macOS dark mode
In 10.14's dark mode, all views are layer-backed and the assumption that child
windows are redrawn with their parent may not be correct. Change Refresh() to
explicitly refresh child windows too.

Also explicitly refresh the page before showing it in wxPreferences, because
otherwise generic windows wouldn't be drawn correctly.
2018-09-20 19:19:15 +02:00
Václav Slavík
398e8744bd Fix TLW appearance in macOS 10.14's dark mode
Set toplevel window's background colour to the correct value of
NSColor.windowBackgroundColor (i.e. wxSYS_COLOUR_APPWORKSPACE). Without this,
the window's frame would be rendered slightly incorrectly, because of the way
the dark mode blends colors - even when no part of the window's interior, where
the background color would be used, is visible.
2018-09-20 19:19:15 +02:00
Václav Slavík
7564d7ff27 Add M_COLDATA access asserts to wxOSX
Similarly to wxGTK, check the color for validity before deferencing its ref data.
2018-09-20 19:19:15 +02:00
Václav Slavík
d3e35b6bb1 Fix wxUnknownControlContainer background handling
Don't set invalid background color. Don't set debugging magenta background
color, because it did more harm than good, particularly after
d255dc6706.
2018-09-20 19:19:15 +02:00
Václav Slavík
d4d6524c63 Silence warning building with macOS SDK < 10.14 2018-09-20 19:19:15 +02:00
Václav Slavík
7dfe9e05c6 Slightly improve wxStatusBar in macOS dark mode
Tweak text color to match the latest GM version. Add comment explaining
inadequacy of this approach.
2018-09-20 19:19:15 +02:00
Vadim Zeitlin
deb0c2566b Document the change to unknown options handling in configure
They used to be silently ignored, but are flagged as errors since
aa7e10bb09
2018-09-20 17:40:11 +02:00
Vadim Zeitlin
d663cd5641 Merge branch 'travis-toolkits' of https://github.com/MaartenBent/wxWidgets
Test all the 2nd (and even 3rd) tier ports on Travis CI too: run builds
using wxX11, wxQt, wxDFB and even wxMotif.

See https://github.com/wxWidgets/wxWidgets/pull/922
2018-09-20 13:55:01 +02:00
Maarten Bent
6b9a6d4446 Disable wxUIActionSimulator for wxDFB
Show used toolkit when disabling wxTooltip.
2018-09-19 22:03:00 +02:00
Vadim Zeitlin
b37bf78a0b Add file required by wxDFB 2018-09-19 22:03:00 +02:00
Maarten Bent
ce4363eb7c Add implementations for missing wxDFB functions 2018-09-19 22:03:00 +02:00
Maarten Bent
86d586222d Add missing wxFont constructor to wxMotif 2018-09-19 22:02:47 +02:00
Maarten Bent
837b7ca3e1 Fix ambiguous call to wxNotebook::DeletePage 2018-09-19 22:01:18 +02:00
Maarten Bent
7bf952165f Test success in BitmapTestCase::Mask() 2018-09-19 22:01:17 +02:00
Maarten Bent
a914478f60 Add guards around test cases 2018-09-19 22:01:17 +02:00
Maarten Bent
4a93c99aeb Use correct signature for Qt mouseEvent and keyEvent 2018-09-19 22:00:02 +02:00
Maarten Bent
a02df37fb8 All QFont enum values are available since Qt 5.5 2018-09-19 22:00:02 +02:00
Vadim Zeitlin
d2ab2ef442 Fix wxFont compilation with Qt 5.2
This version doesn't define all the font constants available in the
later Qt versions, so define our own symbols for them.
2018-09-19 22:00:02 +02:00
Maarten Bent
d3628d8373 Build more toolkits with Travis CI 2018-09-19 22:00:01 +02:00
Pavel Kalugin
54cf25a9ea Fix typo in event handling overview 2018-09-19 14:30:50 +02:00
Vadim Zeitlin
f741031e69 Suppress gcc -Wfloat-conversion warning in wxFontInfo ctor
Add an explicit cast to avoid warnings when compiling with this option.

While just casting double to float is not the best idea, it seems quite
unlikely that anybody would pass a value outside of float range to this
ctor.
2018-09-18 15:57:43 +02:00
Vadim Zeitlin
9bd3de272a Merge branch 'mdi-window'
Fix handling of MDI "Window" menu under MSW when the translation of its
label changes during the program lifetime.

See https://github.com/wxWidgets/wxWidgets/pull/937
2018-09-18 14:16:04 +02:00
Vadim Zeitlin
d355af3420 Fix compilation of generic wxNativeFontInfo::FromString()
There is no need to use ConvertFromLegacyWeightIfNecessary() here as the
string representation is not supposed to contain the legacy weight
constants. And it was also used incorrectly, resulting in build errors
for e.g. wxDFB.
2018-09-18 14:12:55 +02:00
Vadim Zeitlin
b88d5e08ce Fix adding pages without associated window to wxTreebook
wxTreebook is supposed to allow not specifying any valid window for the
top-level pages, but this didn't work any longer, probably since the
changes of 02a92e23f3 (see #4379), as a
possibly null page was dereferenced without checking, resulting in a
crash.

Fix this by adding a missing check.

Also rename DoGetNonNullPage() to TryGetNonNullPage() to make it more
clear that this function can return null and add a unit test checking
that calling AddPage(NULL) really works (or at least doesn't crash).

See https://github.com/wxWidgets/wxWidgets/pull/921
2018-09-18 00:33:59 +02:00
Vadim Zeitlin
2ee322b667 Slightly simplify the previous commits
Remove SetWindowMenuLabelTranslated() which was only called once and so
didn't seem to be worth having. Also get rid of WINDOW_MENU_LABEL for
the same reason: it was used only once and imposed the use of
gettext_noop() which is not needed any longer.

Rename GetWindowMenuLabelTranslated() to have a MSW prefix in order to
indicate that it's a private MSW function and not part of the public wx
API.

Also renamed "Translated" to "Current" to (hopefully) more clearly
indicate why do we need to keep this variable.
2018-09-18 00:13:35 +02:00
utelle
9a9176a1be Change storage of window menu label translation
Use member variable instead of global variable
2018-09-18 00:05:50 +02:00
utelle
9907ca13f9 Fix issue with MDI window menu label
If the locale is changed while the MDI window menu is active, the menubar entry labelled with the previous translation will not be removed. The previous translation is now remembered and used to locate the menubar entry.
2018-09-18 00:05:50 +02:00
Vadim Zeitlin
39e19a8f8c Remove non-existent src/commit/execcmn.cpp from Unix Makefile
This should have been done back when this file was removed in
9b70925d3e, see #10258.

Closes #18222.
2018-09-18 00:01:01 +02:00
Vadim Zeitlin
9c9e8ef537 Remove wxGTK-specific commented out code in wxHeaderCtrl
No real changes, just remove some commented out code add back in 2009 by
6a2a30a8aa.
2018-09-17 23:47:27 +02:00
Anil
0fb97907e1 Fix generic wxHeaderCtrl repainting in scrolled state
Clear the device context used for painting the tabs to avoid repainting
issues.

Closes https://github.com/wxWidgets/wxWidgets/pull/908

Closes #18209.
2018-09-17 23:47:27 +02:00
Vadim Zeitlin
698120c225 Merge branch 'cmake-dialogs-sample' of https://github.com/MaartenBent/wxWidgets
Proper fix for building dialogs sample for CMake.

See https://github.com/wxWidgets/wxWidgets/pull/934
2018-09-17 23:31:55 +02:00
Maarten Bent
53dbff2962 CMake: Fix building dialogs sample
Add the source files of the generic dialogs to the project,
similar as is done in the bakefile.

See previous commits 573e887a4c and
6415bd553f, which partially reverted it,
for the full story.
2018-09-17 23:30:53 +02:00
Maarten Bent
d8211f389c Remove OS/2 remnants from bakefile of dialogs sample 2018-09-17 23:30:47 +02:00
Vadim Zeitlin
764b174199 Merge branch 'cmake-adv' of https://github.com/MaartenBent/wxWidgets
Keep empty adv library for backwards compatibility in CMake builds too.

See https://github.com/wxWidgets/wxWidgets/pull/918
2018-09-17 23:28:06 +02:00
Vadim Zeitlin
1f435261f6 Merge branch 'more-qt-win-build-fixes' of https://github.com/catalinr/wxWidgets
Miscellaneous fixes for building wxQt under MSW.

See https://github.com/wxWidgets/wxWidgets/pull/918
2018-09-17 23:26:27 +02:00
Vadim Zeitlin
795095a4ec Fix wxGenericListCtrl build with wxUSE_STD_CONTAINERS and C++98
Use wxShrinkToFit() instead of wxVector::shrink_to_fit() which is not
defined in this build configuration.

This was broken by recent 2af7e38153.

See https://github.com/wxWidgets/wxWidgets/pull/924
2018-09-17 23:20:03 +02:00
Vadim Zeitlin
26b4701ebd Define wxShrinkToFit() helper for wxVector<>
Unlike member shrink_to_fit(), this function is always defined, even
when wxVector is pre-C++11 std::vector<>.
2018-09-17 23:19:23 +02:00
Vadim Zeitlin
0fd8ec0fa2 Include <utility> to get std::swap() declaration in C++11
Include both <algorithm>, to get std::swap() declaration when using
C++98, and <utility>, to do the same thing when using C++11.

This is not pretty but simpler than using preprocessor tests (which
would need to take MSVS into account in a special way) and virtually
guaranteed not to break anything.

Closes #18220.
2018-09-17 23:01:30 +02:00
Vadim Zeitlin
6401c2e956 Merge branch 'font-fixes'
Complete support for fractional point sizes and font weights other than
light/bold.

Also harmonize wxFont API and implementation among all ports (fixing
compilation of those of them that were broken by recent changes).

See https://github.com/wxWidgets/wxWidgets/pull/919
2018-09-17 22:58:56 +02:00
Vadim Zeitlin
6cbc661179 Merge branch 'grid-corner-label'
Add wxGrid::SetCornerLabelValue().

See https://github.com/wxWidgets/wxWidgets/pull/928
2018-09-17 22:57:05 +02:00
770e0bcd16 Improve high DPI support in wxAui
Window initial/minimum/maximum sizes are now treated as logical pixels.

Furthermore, many margins and paddings are now converted using
wxWindow::FromDIP() to allow their growth in accord with screen DPI.
This places buttons on toolbars more apart on high DPI screens providing
space for easier touch operations.

Closes https://github.com/wxWidgets/wxWidgets/pull/933
2018-09-17 22:54:29 +02:00
Vitaly Stakhovsky
2af7e38153 Replace obsolete object array with vector in wxGenericListCtrl
Use wxVector<wxListLineData*> instead of WX_DECLARE_OBJARRAY().

This modernizes the code and allows to get rid of the static variables
previously used for sorting as now we can use std::sort().

Closes https://github.com/wxWidgets/wxWidgets/pull/924
2018-09-17 22:50:43 +02:00
Vadim Zeitlin
f69dbaa1ae Introduce MSW ARM64 support
This is a preliminary ARM64 platform support for wxWidgets at "it
compiles" stage. This will allow building and testing wxWidgets based
apps for oncoming Windows 10 ARM64.

Requirements:
- Visual Studio 2017 Update 4 or later with Visual C++ compilers and
  libraries for ARM64 component installed

Building:
1. Open command prompt.
2. Change directory to build\msw subfolder.
3. Run "C:\Program Files (x86)\Microsoft Visual
   Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" once.
4. Use `nmake TARGET_CPU=ARM64 ...` to build required flavor of wxWidget
   libraries.

Notes:
1. Building of *.sln/*.vcxproj files does not support ARM64 yet. This
   requires to hardcode Windows SDK to 10.0.15063.0 or later in
   *.vcxproj files, which would render them non-compilable in older
   Visual Studio versions. Microsoft is aware of this issue and is
   planning a fix in the next version of Visual Studio.
2. wxmsw31ud_gl.dll does not build yet. Awaiting Microsoft to deliver
   missing opengl32.lib for ARM64. Please, specify USE_OPENGL=0.

Closes https://github.com/wxWidgets/wxWidgets/pull/923
2018-09-17 22:34:32 +02:00
Vadim Zeitlin
2cc44337c6 Use only wxFont ctor from wxFontInfo in the samples
Follow the documentation advice and prefer to use the ctor taking
wxFontInfo as it makes the code slightly shorter and more readable.
2018-09-17 15:29:42 +02:00
Vadim Zeitlin
b1dcdb864c Add simple unit tests for the new wxFont features
Check that calling SetFractionalPointSize() and SetNumericWeight() at
the very least results in the expected return values from
GetFractionalPointSize() and GetNumericWeight().
2018-09-17 15:24:42 +02:00
Vadim Zeitlin
5a4d46bf7d Handle fractional point sizes in DirectWrite wxGraphicsFont
Also stop scaling the font size by DPI manually, we don't need to do it
if we use points instead of pixels. This, in turn, made it unnecessary
to pass ID2D1Factory parameter to wxD2DFontData ctor.
2018-09-17 15:24:42 +02:00
Vadim Zeitlin
d5020362ff Handle fractional point sizes in GDI+ wxGraphicsFont
Also switch to using UnitPoint when creating GDI+ fonts as it's not
clear at all why should we use UnitPixel here.
2018-09-17 15:24:42 +02:00