Commit Graph

71940 Commits

Author SHA1 Message Date
James Pan
866cdfe200 Complete Chinese translations
There are no more untranslated or fuzzy messages remaining.
2022-02-03 16:02:04 +01:00
Vadim Zeitlin
e5e9794607 Merge branch 'SplitterResizeExample' of https://github.com/skeetor/wxWidgets
Add an example how to use the new splitter resize event and other minor
updates to the splitter sample and wxSplitterWindow itself.

See #22065.
2022-02-02 23:24:07 +01:00
Gerhard Gruber
9c28cda792 Updated sample to allow switching doubleclick on sash on or off. 2022-02-02 22:32:07 +01:00
Vadim Zeitlin
82ab884046 Undo unnecessary comment reformatting
No real changes, but this just avoids a gratuitous difference with
master before merging.
2022-02-02 14:48:30 +01:00
Vadim Zeitlin
0ea99046e1 Fix vetoing of wxEVT_SPLITTER_DOUBLECLICKED after recent changes
The change of semantics of DoSendEvent() broke the logic in
OnDoubleClickSash(), fix it now and remove DoSendEvent() entirely as
it became useless now that it doesn't test whether the event was vetoed
any more and the code is simpler without it.
2022-02-02 14:45:00 +01:00
Vadim Zeitlin
23c5cd3de1 Restore removed event.Skip() in the splitter sample
There doesn't seem to be any reason for removing this one, so restore it
and add the same explanatory comment as was added to the other handlers.
2022-02-02 14:26:22 +01:00
Vadim Zeitlin
46dce3e160 Merge fix for environment variable expansion in XRC bitmap paths
This is a merge of the branches 'fix-xrc-envvar-bitmapbundle' of
https://github.com/ousnius/wxWidgets & 'ak_fix-xrc-envvar-bitmapbundle'
of https://github.com/kosh543/wxWidgets.

Fix the recently introduced bug in environment variables expansion in
the bitmap paths and add a unit test ensuring it isn't introduced again.

See #22071, #22080.
2022-02-02 14:20:51 +01:00
Alexander Koshelev
c986763a77 Test environment variables in XRC bitmap paths 2022-02-02 10:56:51 +03:00
Tobias Taschner
03efe56cf9 Allow WebView2 Edge updates without restart
The previous implementation initialized the version number only once.
This caused subsequent calls to wxWebView::GetBackendVersionInfo() to
return the same version number even if the runtime has been updated or
a fixed version runtime had been activated via
wxWebViewEdge::MSWSetBrowserExecutableDir().

This change allows to require a minimum runtime version and allow
a runtime update without requiring a restart of the application.

Closes #22076.
2022-02-01 23:15:18 +01:00
Kvaz1r
03b2ebcffb Fix setting focus on mouse button press in wxUniv
Call base version of HandleMouse to allow the base theme handle to set
the focus to the widget.

Closes #22074.
2022-02-01 23:13:47 +01:00
Vadim Zeitlin
2bbe0d7769 Merge branch 'tango_svg' of https://github.com/TcT2k/wxWidgets
Replace PNG images with SVG in Tango art provider and add a couple of
new art IDs for the use in the webview sample.

See #22067.
2022-02-01 23:12:43 +01:00
Tobias Taschner
73d37d460d
Add tango art for refresh and stop
Use the added art IDs in webview sample
2022-02-01 09:50:32 +01:00
Tobias Taschner
766fefeb34
Use SVG instead of PNGs in tango art provider
Replace embedded tango PNG data with SVG data of the same icons.
2022-02-01 09:46:55 +01:00
Tobias Taschner
f256e5ae59
Add additional wxBitmapBundle::FromSVG() overload
This overload can work on non 0 terminated unsigned char arrays.
Especially useful for headers created by bin2c.py
2022-02-01 09:46:48 +01:00
Vadim Zeitlin
ae7fa19ae3 Improve fallback logic in wxArtProvider::GetBitmap{,Bundle}()
This improves the changes of f78db92462 (Avoid bitmap scaling in
wxArtProvider::GetBitmapBundle(), 2021-12-17) and still uses a custom
bundle to avoid scaling the bitmap if possible, but does it in
GetBitmapBundle() itself rather than CreateBitmapBundle().

This allows to also use CreateBitmapBundle() from GetBitmap(), as there
is no possibility of infinite recursion due to calling each of these
functions from the other one any more, and so allows defining art
providers overriding only CreateBitmapBundle() instead of having to
always override both it and CreateBitmap().

Also add a unit test, even if just a trivial one, for these functions,
to at least check that they don't crash.
2022-01-31 22:53:13 +00:00
Gerhard Gruber
bfb5d32582 Fix bug in wxSplitterWindow not handling the event state correct in case of sash pos changing or resize. 2022-01-31 18:20:28 +01:00
Gerhard Gruber
5da9d12272 Added an example how to use the new splitter resize event. 2022-01-31 18:20:28 +01:00
ousnius
eb60079085 Fix XRC environment variable expansion for bitmap bundles 2022-01-31 16:33:00 +03:00
Lauri Nurmi
1a10199575 Document installing vcpkg packages for x64, too
Vcpkg defaults to installing packages for x86-windows, and from the
perspective of x64 builds, the packages installed just cannot be
found -- and the reason is not very obvious.

Having an example with commands that will install both x86 and x64 is
probably the right thing to do in this day and age -- and if somebody
only wants one and not the other, seeing a package name with architecture
specified helps with guessing how to achieve that.

Closes #22075.
2022-01-30 23:03:17 +01:00
Blake-Madden
49c508c7a9 Fix typo in "By default" in the documentation
It was misspelt as "Bu default" in a couple of places.

Closes #22072.
2022-01-30 22:59:26 +01:00
PB
754f75c1cd Fix memory leaks in artprov sample
The list control used in the Resources Browser dialog had
dynamically allocated wxStrings assigned as item data that
were never freed.

Closes #22070.
2022-01-30 22:58:07 +01:00
Scott Talbert
085d15015a Don't install old or non-existent packages during Linux CI
libwebkitgtk-3.0-dev is long deprecated and isn't used anyway.
gstreamer-0.10* no longer exists even on Ubuntu 18.04.
gstreamermm* is not used by wxWidgets.

Closes #22069.
2022-01-30 22:56:25 +01:00
Artur Wieczorek
2ee8751c46 Use size_t type for index value 2022-01-30 19:27:38 +01:00
Artur Wieczorek
0906e820d9 Use size_t type for index value 2022-01-30 17:29:25 +01:00
Artur Wieczorek
93365e02de Use more relevant macros in wxPropertyGrid 2022-01-30 12:06:27 +01:00
Artur Wieczorek
7e4cd9f1c1 Get rid of unnecessary friend classes 2022-01-30 10:33:17 +01:00
Artur Wieczorek
a86950de7f Get rid of unused variable 2022-01-29 23:36:47 +01:00
Artur Wieczorek
bd784b3186 Refactor functions converting wxArrayString to string in wxArrayStringProperty::GenerateValueAsString()
Because ConvertArrayToString() and ArrayStringToString() produce string
values it would more intuitive to just to return this string as a function
value instead of passing it through the parameter.
2022-01-29 20:32:09 +01:00
Artur Wieczorek
6d318ad0e2 Refactor wxMultiChoiceProperty::GenerateValueAsString()
Because this function produces a string value it would more intuitive to
just to return this string as a function value instead of passing it
through the parameter.
2022-01-29 00:12:27 +01:00
Artur Wieczorek
3c87cc1e49 Get rid of unused member variable 2022-01-28 23:55:12 +01:00
ousnius
0c6dee2171 Fix XRC environment variable expansion for bitmap bundles 2022-01-28 22:59:03 +01:00
Kvaz1r
b8c457e356 Fix scrolling when m_win != m_targetWindow in wxUniv/MSW
This reverts 3b3169fa15 (Fix refresh problems when scrolling with
mousewheel in wxUniv/MSW, 2021-09-23) (see #2525) and replaces it with a
wxUniv-specific workaround in wxScrollHelperBase::HandleOnScroll().

Closes #2640.
2022-01-27 23:45:52 +01:00
Vadim Zeitlin
4cff1fce29 Merge branch 'unsigned-arith-conv'
Avoid arithmetic conversion warnings from gcc 12.

See #22063, #22057.
2022-01-27 23:40:03 +01:00
Jeinzi
d94dc0cab5 Add missing parenthesis to an example in wxTextCtrl docs
Closes #22062.
2022-01-27 17:07:15 +01:00
Vadim Zeitlin
e0323663b9 Handle font variants added in Pango 1.50
This avoids -Wswitch gcc warning and could be actually useful too if we
ever use a font in one of these variants.

Closes #22064.
2022-01-27 17:05:41 +01:00
Vadim Zeitlin
37a4bf8693 Add wxColour::Get{Red,Green,Blue,Alpha}() to avoid gcc 12 warnings
These functions return the colour components as unsigned int and so
promote to this type in arithmetic expressions, unlike unsigned char
returned by the existing accessors without the "Get" prefix, which
promotes to (signed) int and results in gcc 12 -Warith-conversion
warnings when the result is then converted to unsigned, as it happened
in our own wxColour::GetRGB() and GetRGBA() functions and would probably
happen in a lot of code outside wx, which could also be updated to use
the new functions instead of inserting casts.
2022-01-27 15:46:42 +01:00
Vadim Zeitlin
28b84a1e96 Avoid gcc 12 -Warith-conversion in wxImageHistogram::MakeKey()
Explicitly convert the operands to unsigned because we do actually want
the result to be unsigned here.

Co-Authored-By: Scott Talbert <swt@techie.net>
2022-01-27 15:30:22 +01:00
PB
5ba37d867c Support creating wxBitmapBundle from SVG in application resource
Allow creating wxBitmapBitmap from SVG image stored in an application
resource on the platforms where wxHAS_IMAGE_RESOURCES is defined.

On Windows, load the bundle from a resource with RT_RCDATA type and on
MacOS from a file with an extension "svg" placed in the "Resources"
subdirectory of the application bundle.

Closes #22061.
2022-01-27 14:39:35 +01:00
Alexander Koshelev
3f3561e2c6 Change inactive bitmap to in wxBitmapBundle wxAnimationCtrl 2022-01-27 14:29:25 +01:00
Alexander Koshelev
2b94729a33 Change wxBitmap to wxBitmapBundle in wxBannerWindow 2022-01-27 14:29:25 +01:00
Alexander Koshelev
85becc9362 Change wxBitmap to wxBitmapBundle in wxBitmapToggleButton 2022-01-27 14:29:25 +01:00
Alexander Koshelev
b2629a97e5 Add wxBitmapBundle::GetPreferredLogicalSizeFor()
We often need the logical bitmap size when using it in size computations
involving window size, so add a function returning it directly to
wxBitmapBundle, similarly to wxBitmap::GetLogicalSize(), to avoid using
FromPhys() everywhere.

Also rename the existing wxBitmapBundle::GetPreferredSizeFor() to
GetPreferredBitmapSizeFor() to make it more clear that this is similar
to wxBitmap::GetSize() and so returns the size in physical units.

Closes #22056.
2022-01-27 14:29:25 +01:00
Tobias Taschner
dd185a0b27 Fix timing issue with wxWebViewEdge::SetPage()
When SetPage() was called during the webview was still initializing
it would silently fail. This will now load the contents when the
webview is ready. Additionally error handling for the underlying
NavigateToString() has been added so it wont fail silently.

Closes #22052.
2022-01-27 14:11:19 +01:00
Vadim Zeitlin
311aa370de Merge branch 'dvc-bmpbundle'
Use wxBitmapBundle in wxDVC-related classes.

See #22051.
2022-01-27 14:10:29 +01:00
Ger Hobbelt
4902b8137b Improve startup time of the display sample under MSW
Performance tweak for samples/display, resulting in a much faster
application start, particularly when built in debug mode, when Windows
messages are dumped to the system debug channel for
inspection/diagnosis.

Speed up the Append() loop below by foregoing the repeated resizing of
the choice drop-down via repeated calls to GetBestSize() which happens
deep inside the Append() call chain and executes another inner loop
calling SendMessage() to get the control contents. (This exhibits
1/2*O(N^2) behaviour thanks to the linear growth of the length of the
inner loop to the length of the outer loop (= number of items to add),
while it is re-executed for every new added item.)

With the 'display' sample, that's about 500+ rounds and about 500*500/2
SendMessage() calls less now on my dev/test rig, taking noticeable time
to start the display application.

---

Issue was found due to the barrage of '(winmsg)' Windows Message debug
log lines zipping by in the monitor app when the sample was build in
Debug Mode. Only significant difference with the Release Build is those
debug lines being output, hence the performance gain is less, but still
measurable, in a Release build. When the machine is otherwise severely
loaded (UI render core maxing out), "measurable" becomes "obnoxiously
noticeable" again on Win10/64.

Closes #22049.
2022-01-27 14:08:33 +01:00
Vadim Zeitlin
224d8ffdaf Merge branch 'ak_high_dpi' of https://github.com/kosh543/wxWidgets
Add support for wxBitmapBundle to XRC.

See #22040.
2022-01-27 14:04:01 +01:00
Gerhard Gruber
1533026945 Allow better control over splitter position on resize
Add an event which can be handled by the application to determine the
splitter position when the splitter window itself is resized.

This can be used to e.g. preserve the splitter at the given proportion
of the window (and not just in the middle, as it would be already
possible by using gravity 0.5).

Closes #22035.
2022-01-27 14:00:51 +01:00
Vadim Zeitlin
8f58562fea Fix typo in bin2c.py comment
Correct the name of the other script.
2022-01-27 13:55:46 +01:00
Alexander Koshelev
7f5910ad07 XRC: ability to create wxCommandLinkButton with wxBitmapBundle 2022-01-24 17:26:52 +03:00
Alexander Koshelev
4ec849a28c XRC: ability to create wxButton with wxBitmapBundle 2022-01-24 17:26:52 +03:00