Commit Graph

39762 Commits

Author SHA1 Message Date
oneeyeman1
f790ccee6f Implement Password style for text control under wxQt 2018-11-18 23:19:45 -05:00
Vadim Zeitlin
3169524864 Don't destroy the HICON returned by SHDefExtractIcon() twice
Surprisingly, this doesn't seem to result in any ill effects, but
passing HICON to wxIcon already ensures that this HICON will be
destroyed in wxIcon dtor, so we shouldn't call ::DestroyIcon() on it
manually.
2018-11-18 23:10:07 +01:00
Vadim Zeitlin
8e740c69cd Initialize icon using InitFromHICON() instead of CreateFromHICON()
The former avoids an unnecessary call to ::GetIconInfo() done by the
latter to retrieve the icon size, as we already have the size here.
2018-11-18 23:09:01 +01:00
Vadim Zeitlin
262124ca1b Remove unnecessary bitmap size check in wxWindowsArtProvider
This "sizeNeeded" is always fully specified as we explicitly use a
fallback size if the input size wasn't, so there is no need for checking
this.
2018-11-18 22:47:29 +01:00
Vadim Zeitlin
49d8491518 Refactor the code to use a wrapper for SHDefExtractIcon()
Avoid duplicating the same code in MSWGetBitmapForPath() and
CreateBitmap().

This also incidentally fixes SHDefExtractIcon() return value check,
which was inverted, in MSWGetBitmapForPath().
2018-11-18 22:43:17 +01:00
Markus Juergens
8698d69c77 Return the best-sized icons from wxWindowsArtProvider
Use SHDefExtractIcon() to retrieve the most appropriately-sized icon
instead of always getting either the small or the large icon and then
scaling it ourselves to make it of the right size.

This results in incomparably better results for large icon sizes, e.g.
256*256, as can be seen in the artprov sample.
2018-11-18 22:34:40 +01:00
Markus Juergens
880b2b0a46 Use icons of correct sizes for wxART_FOLDER in wxMSW
Don't restrict the sizes to just small or large icons but extract the
icon closest to the requested size using SHDefExtractIcon().
2018-11-18 21:16:00 +01:00
Markus Juergens
d5cd939db7 Use native art for PRINT and XXX_FILE art IDs under MSW
These art IDs have natural native equivalents, so do use them.
2018-11-18 20:58:57 +01:00
imReker
bdca91c629 Fix i18n URL parsing problem in wxWebViewArchiveHandler
URL is encoded as UTF-8, so using c_str() may generate invalid encoded
representation in non-UTF-8 locales.

Closes https://github.com/wxWidgets/wxWidgets/pull/1022
2018-11-18 20:42:16 +01:00
Vadim Zeitlin
20b02d6169 Rename new wxTranslations method to GetAcceptableTranslations()
This name seems to be more precise than a very generic "all good" one
used previously.
2018-11-18 01:47:12 +01:00
Lauri Nurmi
2d784da2ee Load catalogs for all preferred languages, if they exist
This way the first and only fallback language isn't necessarily the
msgid language (which is English most often). This is how GNU gettext
works -- it uses multiple fallback languages when multiple preferred
languages are set.

As a side effect, fixes #18227 in one possible way.
2018-11-18 01:47:12 +01:00
Lauri Nurmi
5d08e404c7 Allow getting all usable translations languages
Add a method to return the full list of translations that can be used,
generalizing the existing GetBestTranslation().
2018-11-18 01:47:12 +01:00
Vadim Zeitlin
8dbebf9164 Merge branch 'update_submodules' of https://github.com/MaartenBent/wxWidgets
Update all 3rd party libraries to the latest versions.

See https://github.com/wxWidgets/wxWidgets/pull/1023
2018-11-18 01:00:13 +01:00
Maarten Bent
aa8ce7acb1 Include minor version in jpeg library version info 2018-11-17 19:08:42 +01:00
Maarten Bent
ec4b71afa0 Update tiff submodule
Add the new files to the build system. Disable support for webp and zstd
because we do not want to depend on external libraries.
2018-11-17 19:08:40 +01:00
Maarten Bent
9b8ed6a021 Update png submodule 2018-11-17 19:06:32 +01:00
Maarten Bent
c0febe1fce Update expat submodule 2018-11-17 19:05:12 +01:00
Paul Cornett
29bd2c9274 Don't avoid stock items with GTK+3
They still work fine with GTK+3, we just have to avoid them with GTK+4
2018-11-16 23:31:30 -08:00
Paul Cornett
de57bcd1bc Fix drawing background before drawing toolbar bitmap
The Cairo origin is already set up for the widget
2018-11-16 23:25:31 -08:00
Paul Cornett
0bcd7f9b51 Fix sizing of generic windows in wxToolBar with GTK+3.
Broken by ee0b07fc31. See #18269
2018-11-16 23:20:33 -08:00
Artur Wieczorek
1ba0f055e2 Use dedicated function to get screen position of wxComboCtrl popup
Closes #13462.
2018-11-16 18:51:37 +01:00
Artur Wieczorek
ea7f86d9f7 Use wxVector<int> instead of wxArrayInt 2018-11-14 22:37:16 +01:00
Artur Wieczorek
c05fac0ade Don't re-enter wxComboCtrlBase::HidePopup
Under wxMSW this method is re-entered due to triggering EVT_ACTIVATE when EVT_LEFT_UP is being already handled.
We need to prevent this to avoid generating spurious EVT_TEXT events and raising errors on calling SetFocus().

Closes #18260.
2018-11-14 21:30:35 +01:00
Artur Wieczorek
ae3e581bb9 Don't set wxComboCtrl value twice
The value is set once in wxComboPopup::Dismiss() so there is no need to set it again and generate spurious EVT_TEXT event.

See #18260.
2018-11-14 21:25:52 +01:00
Artur Wieczorek
8793e7fc11 Reduce the scope of variables using to index the loops 2018-11-12 23:54:11 +01:00
Artur Wieczorek
dfc5b35b04 Don't make a local copy of the entire array
Use reference to the member array instead.
2018-11-12 23:42:32 +01:00
Artur Wieczorek
3e50405b5f Update index of selected item of wxOwnerDrawnComboBox popup on inserting new item
We have to update index of the currently selected item if value of inserted item is the same as the value of currently selected item (we take lower index in this case) or if new item is inserted before the current selection (current selection index has to be increased in this case).

Closes #14153.
2018-11-12 23:18:09 +01:00
Vadim Zeitlin
65ac801c40 Make separator click sensitivity in wxHeaderCtrl DPI-dependent
Sensitivity should be greater for high DPI displays to allow the user
clicking as far from the separator in this case as with standard DPI.

Also define a named constant for this value instead of using it
directly.

See https://github.com/wxWidgets/wxWidgets/pull/972
2018-11-12 00:10:56 +01:00
John Gehrig
b07305234c Fix dragging beyond the rightmost column in generic wxHeaderCtrl
Dragging a column header in a wxHeaderCtrl and dropping it past the
rightmost column resulted in a crash due to accessing a column with
invalid index.

Fix this and correctly move the column to the last position when this
happens instead.

This bug notably affected dragging columns in wxGrid.

Closes https://github.com/wxWidgets/wxWidgets/pull/972
2018-11-12 00:08:13 +01:00
Andy Robinson
fe4f35b0a3 Make wxFrame::EnableFullScreenView() work under macOS 10.11+
We must explicitly turn on NSWindowCollectionBehaviorFullScreenAuxiliary
flag to prevent the window from becoming shown in full screen.

Closes #18168.
2018-11-11 19:46:58 +01:00
Artur Wieczorek
4e2d26b22e Keep wxPGProperty editor focused while refreshing the property
Active property's editor should remain focused after refreshing the property.
2018-11-11 11:21:52 +01:00
Artur Wieczorek
d27a1b2770 Create standard dialog buttons with dedicated function
Use CreateStdDialogButtonSizer() function instead of constructing wxStdDialogButtonSizer manually.
2018-11-11 11:15:12 +01:00
Vadim Zeitlin
c252ececda Consistently set m_enableOffset for wxMacCoreGraphicsContext
Previously it was set to true if content scale factor was less or equal
to 1 in some places or if it was strictly less than 2 in some others.

Fix this by adding a new helper SetEnableOffsetFromScaleFactor()
function and using it everywhere to consistently only enable offset for
non-high DPI displays in all cases.
2018-11-10 23:29:54 +01:00
Vadim Zeitlin
5b891e9ffc Merge branch 'dvc-getitemrect'
Make wxDataViewCtrl::GetIremRect() work under all platforms and improve
tests, documentation and fix a couple of other problems in the same code
area.

See https://github.com/wxWidgets/wxWidgets/pull/1015
2018-11-10 22:38:05 +01:00
Artur Wieczorek
c86f795914 Move shared wxVector utilities to one place 2018-11-10 22:27:57 +01:00
Artur Wieczorek
e2115d0d6f Remove unneeded calls to c_str() 2018-11-10 20:44:54 +01:00
Artur Wieczorek
322d6874c3 Use wxVector<> instead of wxArrayPGProperty 2018-11-10 20:43:58 +01:00
Artur Wieczorek
c606a7fc9f Store format as wxString
Using wxString here is simpler and not misleading.
2018-11-10 20:41:00 +01:00
Artur Wieczorek
7911d50335 Use locale-specific date format
There is no need to construct format string manually.
2018-11-10 20:39:57 +01:00
Artur Wieczorek
f3b6e6d3b5 Fix date format specification in wxDatePickerCtrlGeneric with wxUSE_INTL=0
Conversion specification for preferred date representation is "%x", not "x".
2018-11-10 14:59:27 +01:00
Artur Wieczorek
41898c8dc4 Compilation fix for wxUSE_INTL=0 build 2018-11-10 14:49:52 +01:00
Vadim Zeitlin
463deb03c9 Merge branch 'gtk-dpi'
A bunch of improvements for per-monitor DPI support in wxGTK and
wxGraphicsContext more generally.

Closes https://github.com/wxWidgets/wxWidgets/pull/995
2018-11-10 12:15:27 +01:00
VZ
cce9ef9d53 Fix compatibility breakage with wxMask::Create() in wxOSX (#1019)
Defining a Mac-specific Create(wxMemoryBuffer) overload hid the other
Create() overloads, which are actually part of the public API, so they
couldn't be used any longer since the changes of
e7d21f6638

Fix this by renaming this Create() to OSXCreate(), to avoid hiding the
base class methods.

Also remove Mac-specific ctor taking wxMemoryBuffer, this is confusing
and can be avoided by just calling OSXCreate() directly in the only
place where it is used.
2018-11-09 17:52:58 +01:00
Stefan Csomor
e484a2db19 force subview refresh on macOS 10.14
even on dark mode not all NSViews have their own layer, therefore don’t take that as a condition, because a child of such a view still might be layer-backed and need an explicit redraw.
Avoid spurious redraws for not visible windows (especiall important for not-yet fully constructed views or views during destruction)
2018-11-08 15:04:42 +01:00
Artur Wieczorek
9e378480c2 Iterate over all characters of a wxString with iterator 2018-11-07 22:12:56 +01:00
Vadim Zeitlin
3d18e1a2b4 Merge branch 'joystick-fixes'
Harmonize joystick events between different platforms.

See https://github.com/wxWidgets/wxWidgets/pull/1017
2018-11-07 18:33:26 +01:00
Paul Cornett
8929b3d3de Use a more robust check for the GNU C Library
_GNU_SOURCE alone is not definitive
2018-11-05 21:09:13 -08:00
Vadim Zeitlin
caa270a1af Bring Mac wxDataViewCtrl::GetItemRect() in sync with other ports
Return empty rectangle if the item is not currently visible, for
whatever reason, and use physical coordinates for the rectangle origin.

This makes the unit test for GetItemRect() pass under macOS too.
2018-11-06 04:17:27 +01:00
Vadim Zeitlin
bfe11f233f Really implement wxGCDC::GetPPI()
Return the DPI of the associated window, if any, instead of the
hard-coded 72*72.
2018-11-06 03:36:53 +01:00
Vadim Zeitlin
d5c43831b5 Really implement wxGraphicsContext::GetDPI()
Return the DPI of the associated window, if any, instead of always
returning hard-coded 72*72.
2018-11-06 03:36:53 +01:00