Commit Graph

65373 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
303fa4b3ef Minor cleanup in the "artprov" sample after the previous commit
Use the standard wxWidgets camelCase naming convention instead of
snake_case and fix some style inconsistencies.

No real changes.
2018-11-18 20:55:09 +01:00
Markus Juergens
cb8b6009d5 Add a size selection choice to the "artprov" sample
This will allow to test support for larger icons when it is added in the
upcoming commits.
2018-11-18 20:49:34 +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
Artur Wieczorek
c913f4a3df Update mailmap 2018-11-18 15:54:18 +01:00
Vadim Zeitlin
69b837cabf Merge branch 'multi-fallback-langs'
Closes https://github.com/wxWidgets/wxWidgets/pull/1006
2018-11-18 01:47:12 +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
4099e75edb Add property sheet to allow easily configure projects using wx
This seems to be the simplest possible way to let a MSVS project use the
library.
2018-11-18 01:05:10 +01:00
Vadim Zeitlin
a28b48ffe1 Fix formatting in MSW install instructions
Use backticks around _UNICODE to avoid the special meaning of "_" in
Markdown.

Also use backticks around a couple of other identifiers/paths for
consistency.
2018-11-18 01:05:10 +01:00
Maarten Bent
660fbca82d CMake: Add include directories and libraries for all packages
lzma.h could not be found when building with wxUSE_LIBLZMA on macOS. Add
the found include directories and libraries from find_package(LibLZMA)
to the base library.

For consistency, add the include directories and libraries of all
find_package usage.

Closes https://github.com/wxWidgets/wxWidgets/pull/1024
2018-11-18 01:01:28 +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
27d7dd3f00 Update catch submodule 2018-11-17 19:10:45 +01:00
Maarten Bent
4ddd4cc68d Improve updating third party library documentation
Add a section about updating the build files.
2018-11-17 19:08:43 +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
Stefan Csomor
edecb26899 adapting xcodeproj to generic imaglist.cpp 2018-11-14 12:06:36 +01:00
Vadim Zeitlin
8fb1152eee Fix error about duplicate PNG image handler in the drawing sample
Add the handler earlier, as creating the handler main frame uses
wxArtProvider::GetBitmap() which can add the PNG handler on some
platforms (e.g. macOS, when using wxTangoArtProvider), so calling
wxImage::AddHandler() again after creating the frame could result in a
debug error message about adding the same handler twice.
2018-11-13 16:11:24 +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
Vadim Zeitlin
6e3f818da1 Fix formatting of change log entries for consistency
Capitalize the entries, keep them under 80 columns and terminate with
full stop.

Also fix a typo.

No real changes.
2018-11-11 19:46:58 +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
jbbbms
87195cf3ea Put wxDECLARE_EVENT_TABLE at the end of wxTextCtrl declaration
This fixes the access specifier effectively used for the members
following these macros, as it's changed to "public" inside them, meaning
that e.g. m_privateContextMenu was actually public even though it was
ostensibly declared in the private section and the intention was for it
to be private.

Closes #16038.
2018-11-10 23:37:33 +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
43f7e35c52 Explicitly return Boolean value as declared 2018-11-10 20:56:24 +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