Commit Graph

66688 Commits

Author SHA1 Message Date
Paul Cornett
db16c7af93 Avoid deferred show if frame is iconized 2019-08-25 21:10:52 -07:00
Paul Cornett
453999737f Simplification to avoid unreachable code 2019-08-25 21:03:21 -07:00
Paul Cornett
fca4ef0458 Use wxDC rather than wxClientDC for parameter type 2019-08-25 20:53:33 -07:00
Paul Cornett
3b54720b3a Move wxKeyEvent assignment operator out of header
It causes a warning with MSVC code analysis:
"warning C26437: Do not slice (es.63)"
It's unclear if this function even needs to exist, but at least
move it out of line so the warning does not occur for user code.
2019-08-25 18:11:01 -07:00
Paul Cornett
cf4f3a92c5 Avoid Gdk-CRITICAL warnings when GTKFindWindow() is passed an unrealized widget 2019-08-25 17:57:55 -07:00
Tomay
050ca4ce3a Add wxRegEx::QuoteMeta() helper
Quote all characters special for wxRegEx in the given string: this can
be useful when searching for a literal string using wxRegEx.

Closes https://github.com/wxWidgets/wxWidgets/pull/1489
2019-08-25 12:32:51 +02:00
Vadim Zeitlin
363cdc5fdc Slightly simplify wxFileName::URLToFileName()
Use wxString::StartsWith() instead of comparing the result of Find()
with 0: this is shorter and more clear (and marginally more efficient).

No real changes.
2019-08-25 00:59:16 +02:00
Vadim Zeitlin
93983ee229 Remove not really needed global variables in wxFileName code
There is no need to initialize these 2 strings on each and every wx
program startup.

No real changes.
2019-08-25 00:55:40 +02:00
Vadim Zeitlin
1527e657c3 Remove obsolete Mac Classic code from wxFileName::URLToFileName()
This platform is not supported since a long time any longer.
2019-08-25 00:53:47 +02:00
Vadim Zeitlin
111587549e Remove now unnecessary header from filesys.cpp
There is no need to include wx/uri.h from this file any more, now that
it doesn't use wxURI::Unescape() any longer.
2019-08-25 00:52:33 +02:00
oneeyeman1
14bcf09924 Move URL<->filename conversion functions to wxFileName
This ensures that they are always available and can be used in
wxLaunchDefaultBrowser() in all build variants, whereas before this
function didn't handle file:// URLs correctly when the library was built
with wxUSE_FILESYSTEM==0.

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

Closes #10414.
2019-08-25 00:48:39 +02:00
oneeyeman1
5e7b515349 Avoid showing 2 tooltips simultaneously in wxMSW wxListCtrl
Only show the built-in control tooltips if we're not showing any custom
ones.

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

Closes #10492.
2019-08-25 00:40:08 +02:00
AliKet
0b7a7141e3 Fix access to row/column coordinates in wxGrid freezing code
The various arrays containing row/column coordinates (m_rowHeights,
m_rowBottoms, m_colWidths, m_colRights) must not be accessed directly as
they are empty by default, and are only initialized if any rows/columns
have non-default width/height.

Use safe accessor functions instead.

See https://github.com/wxWidgets/wxWidgets/pull/1417
2019-08-25 00:27:28 +02:00
Vadim Zeitlin
9d17d5c376 Simplify and fix again wxStaticBitmap auto-resizing in wxMSW
This updates/replaces 6c59a4e7af which
fixed the problem with auto-resizing of wxStaticBitmap with borders, but
broke auto-resizing of wxStaticBitmap that previously used an invalid
bitmap, as they still have a non-null (currently hard-coded as 16x16)
size in this case and the size updating logic didn't take it into
account.

Instead of trying to make it even smarter, get rid of it completely and
just set the control size to its best size, as the other ports do. This
is simpler and should be less error-prone -- and won't require updating
when the constant 16x16 will be changed to something else (which will
happen soon as part of better high DPI support).

See #18398.
2019-08-24 21:27:26 +02:00
Jeff Davidson
04dfe90e55 Fix wxWindow::setBackgroundColour(wxNullColour) on OS X
Commit 91aa6ba36e introduced a
regression causing this to crash. We need to validate that the color
is valid before attempting to call OSXGetNSColor; if it is not, we
should clear any previously-set background color.

Closes #18470.

Closes https://github.com/wxWidgets/wxWidgets/pull/1503
2019-08-24 21:04:47 +02:00
Artur Wieczorek
70e9dbd756 Make wxComboCtrl a wxCompositeWindow
wxComboCtrl consists of several controls (text entry, button, popup) and therefore should be implemented as a wxCompositeWindow to prevent problems with generating spurious events when e.g. focus is transferred between the sub-controls.

Closes #18394.
2019-08-23 22:55:05 +02:00
Vadim Zeitlin
a47d16dc9f Document that wxTreeCtrl::ScrollTo() doesn't work when frozen
Also mention that EnsureVisible() does work in this case.

See #18435.
2019-08-23 17:23:22 +02:00
oneeyeman1
78c3ef2ebb Implement support for wxFD_NO_FOLLOW in wxMac
Disable aliases resolving in standard file dialogs if this flag is
specified.

Closes https://github.com/wxWidgets/wxWidgets/pull/1479
2019-08-22 23:27:54 +02:00
Rutger van Eerd
0861f6504b Scale maximum value in wxProgressDialog::SetMaximum() too
MSW-specific scaling was done for the initial maximum value in Create(),
but not if the maximum was changed later in SetMaximum(). Now do it
there as well.

Closes https://github.com/wxWidgets/wxWidgets/pull/1497
2019-08-22 23:27:54 +02:00
Stefan Csomor
b822e9efe8 running OpenGL fix only when really needed
(second attempt)
2019-08-22 19:03:18 +02:00
Stefan Csomor
e6ae83c386 running OpenGL fix only when really needed 2019-08-22 19:02:02 +02:00
Vadim Zeitlin
773f8f86e3 Merge branch 'svg-misc' of https://github.com/MaartenBent/wxWidgets
Miscellaneous improvements to wxSVGFileDC, notably add gradient fill
support and shape rendering mode.

See https://github.com/wxWidgets/wxWidgets/pull/1493
2019-08-22 17:21:00 +02:00
Vadim Zeitlin
870f03cd15 Handle wxSL_MIN_MAX_LABELS and wxSL_VALUE_LABEL correctly in wxMac
Create the labels corresponding to each style instead of always creating
all 3 of them whenever any of the styles is specified.

See #11427.

Closes https://github.com/wxWidgets/wxWidgets/pull/1495
2019-08-22 17:17:13 +02:00
Olly Betts
5137b8044e Fix flicker in wxGTK wxStyledTextCtrl
Use the same logic for wxGTK (and other platforms using double
buffering) as was already used for wxMac, it seems to result in less
flicker.

Closes #18017.
2019-08-22 14:57:34 +02:00
Vadim Zeitlin
eff6564795 Don't expand environment variables in wxFileName::MakeRelativeTo()
This could have been unexpected even if it worked as designed and,
unlike with direct calls to Normalize(), there was no way to prevent
this from happening.

Worse, even when no expansion was done, the simple fact of calling
wxExpandEnvVars() could result in replacing "dir\$file" with "dir$file"
as the backslash is considered as an escape character by this function
and hence break the file name structure.

Closes #17977.
2019-08-22 14:28:46 +02:00
Vadim Zeitlin
8dc3c38fad Set event object in wxMSW wxTE_RICH control wxContextMenuEvent
Add forgotten SetEventObject() call.

Closes #18460.
2019-08-22 12:44:09 +02:00
Vadim Zeitlin
70f8bf4c86 Just return true from wxString::Shrink()
The comparison of lengths() seems to be completely unnecessary.

Also document that Shrink() always returns true.
2019-08-22 00:04:04 +02:00
Vadim Zeitlin
ea965327eb Add wxString::shrink_to_fit() as synonym for Shrink()
Provide C++11 std::string-compatible method name too.
2019-08-22 00:01:36 +02:00
Vadim Zeitlin
2dbdbe1927 Merge branch 'mac-opengl-resize'
Really fix Mac wxGLCanvas resize under macOS 10.14.5.

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

Closes #18402.
2019-08-21 23:53:27 +02:00
Vadim Zeitlin
fe56ef557f Merge branch 'wxwindow-getdpi' of https://github.com/MaartenBent/wxWidgets
Add wxWindow::GetDPI() for per-monitor DPI support.

See https://github.com/wxWidgets/wxWidgets/pull/1494
2019-08-21 23:44:19 +02:00
Maarten Bent
bee6168076 Make wxSVGFileDC function parameter names consistent with wxDC 2019-08-21 22:33:36 +02:00
Maarten Bent
72ce980d1e Rename wxSVGFileDC anonymous functions 2019-08-21 22:33:36 +02:00
Maarten Bent
0b728d1bea Use base version of DrawCheckMark directly in wxSVGFileDC 2019-08-21 22:33:36 +02:00
Maarten Bent
75486529e3 Process review comments in wxSVGFileDC 2019-08-21 22:33:35 +02:00
Maarten Bent
5b37d32c50 Use the wxWindow DPI in FromDIP, ToDIP and GetContentScaleFactor 2019-08-21 19:43:42 +02:00
Maarten Bent
9c193e1774 Add wxWindow::GetDPI()
This is simpler to use than wxDisplay(window).GetPPI() which was used
instead of it so far in all ports and can be implemented more
efficiently for wxMSW.

Remove wxGetWinTLW, GetDPI already tries to get the top window.
2019-08-21 19:30:07 +02:00
Vadim Zeitlin
b686d77aaf Fix font height handling in MSW wxNativeFontInfo::FromString()
This is similar to 228cd926e2, but extends
the fix to v1 strings, as even though they have the "point size" field,
this field may still contain 0, resulting in the same problem as with v0
strings, i.e. 0-sized fonts.

Closes #18467.
2019-08-21 14:21:11 +02:00
Maarten Bent
64be484db2 Use pen width 1 for DrawPoint in wxSVGFileDC
This is consistent with other DCs.
2019-08-20 20:21:06 +02:00
Maarten Bent
dfe76430cc Implement GradientFillLinear and GradientFillConcentric for wxSVGFileDC 2019-08-20 20:21:05 +02:00
Maarten Bent
26b273bef9 Fix RTTI class declarations of wxSVGFileDC
wxIMPLEMENT_DYNAMIC_CLASS requires a default constructor (no filename). Check
if m_outfile is initialized with a valid filename before using it.
2019-08-20 20:21:05 +02:00
Maarten Bent
a41a8ded79 Allow to set wxSVGFileDC shape rendering mode 2019-08-20 20:21:05 +02:00
Maarten Bent
75f08dfd51 Use floating point positions in wxSVGFileDC DrawRotatedText and DrawEllipse 2019-08-20 20:21:05 +02:00
Maarten Bent
9412aea1f6 Implement wxBRUSHSTYLE_BDIAGONAL_HATCH for wxSVGFileDC
Create new graphics group before writing brush pattern, so pattern appears in
the same group as the elements using it.
2019-08-20 20:21:04 +02:00
Maarten Bent
e7c03a5646 Use const references in SVG helper functions
Add helper function to get pen style.
Use Col2SVG for wxBrush colours.
2019-08-20 20:21:04 +02:00
Maarten Bent
215f844502 Improve whitespace formatting in generated SVG
Write coordinates first, then styles.
2019-08-20 20:21:04 +02:00
Vadim Zeitlin
05402e9eac Merge branch 'stcacscroll' of https://github.com/NewPagodi/wxWidgets
More fixes for wxSTC auto-completion popup window, notably send the
scroll events to the correct window.

See https://github.com/wxWidgets/wxWidgets/pull/1482
2019-08-20 19:56:01 +02:00
Daniel Kulp
6974a6ceaa Really fix problems with wxGLCanvas resizing under macOS 10.14.5
This is a better fix for the problem with NSOpenGLView having wrong size
after resizing the window under 10.14.5 (only): reset the context when
making the context current, to ensure that the up-to-date size is used.

See #18402.
2019-08-20 19:44:07 +02:00
Vadim Zeitlin
70f0900799 Use white background when rendering print preview
Explicitly use the white brush when erasing background of the bitmap
used for print preview, to match the printed page appearance. Somehow it
worked even without this under other platforms before, but logically
resulted in black background under wxGTK 3.

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

Closes #18371.
2019-08-20 17:37:22 +02:00
Vadim Zeitlin
72272f5901 Document that 3rd person verb forms should be used in the manual
See https://github.com/wxWidgets/wxWidgets/pull/1473
2019-08-20 17:16:53 +02:00
Vadim Zeitlin
fbe651731c Fix problems with documentation HOWTO syntax highlighting
Use backticks to prevent "_" and "*" from being interpreted as special
Markdown characters.

No real changes.
2019-08-20 17:11:37 +02:00