Commit Graph

65089 Commits

Author SHA1 Message Date
Paul Cornett
dc0cf732a2 Provide scale factor to wxGtkStyleContext where it might matter. 2018-11-01 09:58:27 -07:00
Paul Cornett
e13a2cfd03 Make wxGtkStyleContext ctor explicit, just to be safe 2018-11-01 08:50:59 -07:00
Paul Cornett
5ff0d3a458 Improve wxRendererGTK drawing with HiDPI 2018-11-01 00:11:31 -07:00
Vadim Zeitlin
4405176bb9 Return correct scale factor for not yet realized windows in wxGTK
wxWindow::GetContentScaleFactor() always returned 1 before the window
was shown in wxGTK, which was rather annoying as typically icons are
initialized on application startup, i.e. before showing the windows, and
so the wrong scale factor was silently used for them.
2018-10-31 20:24:06 -07:00
Vadim Zeitlin
8e817f8a0e Don't send events from wxTextCtrl::ChangeValue("") in wxGTK
ChangeValue() must not send events, but did in wxGTK when changing the
contents of a wxTextCtrl to be empty when it had been non-empty before.

Closes #18264.
2018-11-01 02:04:01 +01:00
Vadim Zeitlin
5ee0edde99 Merge branch 'propagate-inform-first-dir'
Fix some layouts involving wxWrapSizer by correctly propagating
InformFirstDirection() call to the nested sizers that need it.

See https://github.com/wxWidgets/wxWidgets/pull/988
2018-11-01 00:13:18 +01:00
Vadim Zeitlin
c01328c2da Don't crash due to accessing invalid bitmaps in wxAUI code
Neither GetWidth() nor GetScaledWidth() (nor the corresponding
height-related methods) can be called if the bitmap is invalid and the
resulting assert led to a crash when it happened in wxAuiToolBarArt
drawing code, as it was triggered on each redraw.

Just use bitmap size of (0, 0) if we're not going to draw it anyhow.

Closes #18263.
2018-10-31 23:43:17 +01:00
Vadim Zeitlin
a316942c18 Don't use "extern" when initializing wxCurrentPopupWindow
Avoid (harmless) warning about the variable being initialized and
declared "extern" added by 56c4191168.
2018-10-31 23:26:02 +01:00
Blake Eryx
c1a2d2c967 Show using dynamic splash screen contents in the sample
Demonstrate how dynamic information can be shown in the splash screen
overlaying the static bitmap.

Closes https://github.com/wxWidgets/wxWidgets/pull/958
2018-10-31 23:23:31 +01:00
Evileye
28f7e6130d Fix wxDateTime::ParseFormat() when matching TZ offset and in DST
Don't skip MakeFromTimeZone() for the current time zone, this is still
necessary.

Fixes a failure in the unit tests when running during a DST period with
TZ=Europe/London, for example.

Closes https://github.com/wxWidgets/wxWidgets/pull/966
2018-10-31 23:16:03 +01:00
Tobias Taschner
394b26bc36
Fix wxGetDiskSpace() documentation
The function is actually declared in utils.h and not in filefn.h
2018-10-31 10:26:11 +01:00
Paul Cornett
8c99df373a Fix handling of scaled bitmaps in wxToolBar with GTK+3
We have to draw them ourselves to get the size right.
See #18225
2018-10-30 22:59:07 -07:00
Vadim Zeitlin
8a76b8072a Merge branch 'text-event-tests'
Improve and extend wxTextCtrl unit tests.

See https://github.com/wxWidgets/wxWidgets/pull/996
2018-10-31 02:27:16 +01:00
Václav Slavík
e5beb4e93f Improve wxDataViewMainWindow::RefreshRow speed
RefreshRow() is called very frequently, and in particular after every
ItemChanged notification. Calling GetEndOfLastCol() in it repeatedly is
extremely inefficient in presence of auto-sizing columns, and doesn't
make much sense anyway - controls with significant space unoccupied by
columns are rare, and rendering of such unused space is efficient (just
background erase). It is therefore more performant to simply refresh
the entire row instead of repeatedly and expensively calculating the
smallest rectangle that needs repainting.

Fixes previously wrong calculation of the refreshed rectangle in
RefreshRows() in the process.

Fixes major performance regression introduced in
77c7c80696.

Closes https://github.com/wxWidgets/wxWidgets/pull/970
2018-10-30 23:50:40 +01:00
Silent
6fff1c37b5 Avoid using mismatched translations for wxWizard buttons
Cache labels for "Next>" or "Finish" button in wxWizard so that their
translations stay consistent throughout wizard's lifetime: previously,
this button could use a label in a different language if the currently
used translations have changed since the wizard creation, as this label
was recreated on every page change, unlike the other labels which were
only translated once in the very beginning.

Closes https://github.com/wxWidgets/wxWidgets/pull/1000
2018-10-30 23:45:12 +01:00
Stefan Csomor
9a05410470 Adding IsSolid to wxColour
Under macOS colors can be patterns, then accessors for RGB values are useless, IsSolid returns true if the color can be expressed in RGB values at all.
2018-10-30 20:53:35 +01:00
VZ
3ab2bfd62a Remove unused wx/osx/icon.h header (#998)
This header isn't necessary any longer after the changes of
0bdd7e5f48
2018-10-30 09:34:19 +01:00
VZ
d118ca6c56 Remove wxImageList::Add() overload taking wxIcon from wxOSX (#997)
This is not necessary as wxIcon is implicitly convertible to wxBitmap
anyhow, so calling Add(icon) works using the existing Add(wxBitmap)
overload, and is actually harmful because of the wrong icon size check
in this function, which used physical bitmap size instead of the logical
(scaled) size.

Closes #18188.
2018-10-30 09:31:15 +01:00
Vadim Zeitlin
f3c148cd4a Verify that wxTextCtrl::ChangeValue("") doesn't generate events
Check that changing the value of an already empty control to empty
doesn't result in any events.

See #18264.
2018-10-30 01:35:32 +01:00
Vadim Zeitlin
602b4a6863 Run all wxTextEntry unit tests for wxTextCtrl too
Comment stated that InsertionPoint() didn't pass, but it was actually
already running (and passing) and the only excluded test was the
TextChangeEvents() one which really should pass for multiline controls
as well, so run it too.
2018-10-30 01:34:27 +01:00
Vadim Zeitlin
53f527726e Merge branch 'use-scrollbar-fixes'
Minor fixes, mostly add wxUSE_SCROLLBAR guards.

See https://github.com/wxWidgets/wxWidgets/pull/989
2018-10-29 23:15:39 +01:00
Vadim Zeitlin
9d717a1204 Replace wxUSE_DATEPICKCTRL with wxUSE_TIMEPICKCTRL in #endif too
Complete the change of 93d71116b7
2018-10-29 23:14:30 +01:00
Vadim Zeitlin
a34bedd7b5 Revert "Add guard over wxMSWDateControls"
This reverts commit f1fa6d5ea2 which
doesn't seem correct nor necessary.
2018-10-29 23:12:57 +01:00
Vadim Zeitlin
8890a25db3 Merge branch 'setup-h-cmake' of https://github.com/MaartenBent/wxWidgets
Fix issues with generating setup.h.in.

See https://github.com/wxWidgets/wxWidgets/pull/994
2018-10-29 15:18:43 +01:00
Vadim Zeitlin
ea8d65dc83 Merge branch 'cmake_misc' of https://github.com/TcT2k/wxWidgets
CMake documentation improvements and increase MSVC warnings level.

See https://github.com/wxWidgets/wxWidgets/pull/993
2018-10-29 15:16:54 +01:00
Tobias Taschner
18db61d568 Fix MSW wxCheckOsVersion() without manifest
Reimplement wxCheckOsVersion() to use wxGetOsVersion() on windows.

An executable without the Windows 8.1+ compatibility info in a
manifest would not detect the version based on the VerifyVersionInfo()
API previously used.

Closes https://github.com/wxWidgets/wxWidgets/pull/992
2018-10-29 15:15:41 +01:00
Vadim Zeitlin
5d06593ae1 Ensure that wxThread::Pause() suspends the thread immediately
Surprisingly, ::SuspendThread() doesn't actually do it, but only
schedules the thread for suspension in some undetermined near future.
This could result in problems as Pause() could exit, releasing the CS
protecting wxThread internal data in the main thread, and allowing the
worker thread to enter it (e.g. in its TestDestroy()) before being
actually suspended, meaning that the thread got suspended inside a CS,
which resulted in later deadlocks.

Fix this by calling ::GetThreadContext() which is supposed to ensure
that the scheduler does really suspend the thread before it returns (as
it's impossible to get the context of a thread while it's running).

Closes #18137.
2018-10-29 14:55:09 +01:00
Vadim Zeitlin
832f837f75 Merge branch 'macos-configure-cpp'
Use SDK options with cpp too in configure under macOS.

See https://github.com/wxWidgets/wxWidgets/pull/985
2018-10-29 14:47:09 +01:00
Paul Cornett
25a54a9b56 build fix for wxUniversal 2018-10-28 09:16:06 -07:00
Paul Cornett
dd1a6a6d35 Avoid NULL pointer dereference when calling GetScaleFactor() on invalid bitmap with GTK+3 2018-10-28 09:15:33 -07:00
Vadim Zeitlin
5d5654742f Merge branch 'msw-popup'
Reimplement wxPopupWindow using WS_POPUP instead of WS_CHILD window in
wxMSW as the new approach allows using the controls inside the popup
normally, unlike the old one.

See https://github.com/wxWidgets/wxWidgets/pull/986

Closes #18243.
2018-10-27 15:08:22 +02:00
Vadim Zeitlin
79a37a2a65 Don't try to set focus outside of popup window in wxMSW
This will just hide the window immediately, so prefer to ignore the
"focus" argument of Popup() but show the popup instead.

Update the documentation to mention that setting focus outside of popup
is not supported under all platforms.
2018-10-27 15:06:42 +02:00
Vadim Zeitlin
965f890919 Fix regression in wxTopLevelWindowMSW::IsMaximized()
This fixes another bug from 3518f1a7d8
(after the one fixed in 5766280311): if a
window was maximized by user and then hidden, its IsMaximized() returned
false because it examined m_showCmd which didn't have SW_MAXIMIZE value
in this case.

The same was true for IsMinimised() as well.

Fix both problems by updating the value of m_showCmd when hiding the
window.
2018-10-26 04:01:04 +02:00
Vadim Zeitlin
f11849b7e8 Document not completely obvious wxRearrangeList::Set() behaviour
Calling Set() resets the existing items order, which makes sense from
the implementation point of view, but not necessarily expected by the
users.

See #18262.
2018-10-26 01:35:28 +02:00
Maarten Bent
f1cf525944 Add CMake option to set wxDEBUG_LEVEL
It is no use adding it to the generated setup.h because this section is commented out,
so add it as compiler option instead.
The default option is 'Default' in which case no compiler option is added.
2018-10-25 20:46:31 +02:00
Maarten Bent
a02bb61e90 Fix build errors after modifying CMake setup.h.in
Always set a value to ICONV_CONST so it will be defined in setup.h.
Add a check for strtoull to prevent a macro redefined warning.
Link with WebKit framework to fix macOS build with wxUSE_WEBKIT.
2018-10-25 20:46:31 +02:00
Maarten Bent
6363db488f Make CMake setup.h.in an exact copy of setup.h.in
Except use cmakedefine and cmakedefine01 to declare the variables.
2018-10-25 20:46:31 +02:00
Maarten Bent
828c3ce50d Remove duplicate line from update-setup-h
It was intended to be update_osx_setup_h but resulting setup.h.in would not
work because the macOS options are not initialized by configure or CMake.
2018-10-25 20:36:22 +02:00
Stefan Csomor
f257780771 Implement shaped windows closer to other platforms
wxFRAME_SHAPED is not needed anymore under OSX and a shaped window can just have a background color, does not need a paint handler.
2018-10-25 20:13:40 +02:00
Maarten Bent
c41255bd98 Add recent macOS setup.h defines to correct file
It was added to setup.h, not setup_inc.h. Regenerating setup.h would remove the defines.
2018-10-24 19:30:41 +02:00
Tobias Taschner
e285b3dfef
Silence harmless MSVC warning (hidden local var) 2018-10-24 10:53:53 +02:00
Tobias Taschner
a52393267a
CMake: Enable highest warning level for MSVC
This is not enabled for third party libaries as they are currently
producing too many warnings.
2018-10-24 10:52:47 +02:00
Tobias Taschner
d433aa7821
Include CMake in how to add new sample docs 2018-10-24 10:37:52 +02:00
Tobias Taschner
2ad0c1b7e1
Include CMake in how to add wxUSE_ documentation 2018-10-24 10:30:49 +02:00
Vadim Zeitlin
9562ca2b70 Block child window events propagation beyond wxPopupWindow
Set wxWS_EX_BLOCK_EVENTS to prevent events bubbling up to the popup
parent as it doesn't make much sense.

See #18243.
2018-10-24 02:06:46 +02:00
Vadim Zeitlin
67e51e7b6d Show the reason transparent windows can't be used in shaped sample
IsTransparentBackgroundSupported() may return more information about why
exactly are transparent windows not supported, show it if available.
2018-10-24 01:37:44 +02:00
Stefan Csomor
708a408733 move macOS transparency fix one level up 2018-10-23 21:12:48 +02:00
Stefan Csomor
a94325a76a fix transparency problems on macOS
under mojave any backgroundColor destroys transparency
2018-10-23 21:01:31 +02:00
Stefan Csomor
651e1cd1b5 Supporting newer transparent background API 2018-10-22 22:36:42 +02:00
Stefan Csomor
7dfbe50fc0 fixing proper font rendering color when using emulated bold
when the stroke width is set in macOS (emulated bold), the stroke color was not correctly set - unless text color was black
2018-10-22 17:43:31 +02:00