Commit Graph

72393 Commits

Author SHA1 Message Date
Vadim Zeitlin
b390c487f7 Fix wxMemoryDC::SetFont(wxNullFont) broken by recent changes
Fix crash in this function introduced by 9e5c8a8027 (Respect bitmap
content scale factor in wxMSW wxMemoryDC, 2022-03-26).

Also add a unit test ensuring that this doesn't get broken again under
MSW, which seems to be the only place where it works.

Closes #22240.
2022-03-29 14:10:34 +01:00
Vadim Zeitlin
4979457f4d Add wxMemoryDC::GetTextExtent() unit test
Test this wxDC kind too.
2022-03-29 13:45:40 +01:00
Vadim Zeitlin
a0d1379a57 Split wxDC::GetTextExtent() test case in 3 pieces
No real changes, just don't test all the different wxDC kinds in one
test, when they are completely separate.
2022-03-29 13:43:21 +01:00
Paul Cornett
ffdaec88ee Fix wxDataViewIconTextRenderer background on GTK
Background attribute needs to be set on the icon renderer as well.
See #19301
2022-03-28 21:28:10 -07:00
Vadim Zeitlin
9bb3945778 Fix spurious assert in GetLocalizedName() under Unix
Add a missing "break" forgotten in 6d6e5cde21 (Enhance wxUILocale and
wxLocaleIdent, 2022-03-28).

See #2615.
2022-03-28 18:10:55 +02:00
Vadim Zeitlin
efa1c59141 Allow setting WX_HTML_OUTPUT_DIR to override default location
This allows to avoid making custom changes when generating the docs on
docs.wxwidgets.org and can be more generally useful too.
2022-03-28 15:43:32 +02:00
Vadim Zeitlin
cd4d9011b7 Fix appearance of search results when using server-based search
Use fixed Doxygen PHP search functions to work around Doxygen bug
https://github.com/doxygen/doxygen/issues/7892 which affected our docs
too.

Closes #19276.
2022-03-28 15:29:50 +02:00
Vadim Zeitlin
263b1844dc Show only the updated files when uploading the docs
Don't use rsync "--verbose" option as it's too verbose, show just the
names of the files being uploaded.
2022-03-28 11:44:48 +02:00
Vadim Zeitlin
dfb4a3bd02 Run docs update workflow for pull requests too
Also run it only if any documentation-related files were modified.
2022-03-28 11:37:34 +02:00
Vadim Zeitlin
f26d25fcb6 Suppress ssh messages about adding known host in docs workflow
This is useless and contains the host IP and port which we don't want
want to show.
2022-03-28 11:33:25 +02:00
Vadim Zeitlin
6678c93eae Merge branch 'docs-workflow'
Fix the documentation update GitHub Action workflow.
2022-03-28 11:25:28 +02:00
Vadim Zeitlin
4179d13dab Fail the documentation build if there are any Doxygen warnings
Check for Doxygen warnings, that are, for the most part, actually
errors, to ensure that they don't creep back in after they were recently
fixed.
2022-03-28 11:16:53 +02:00
Vadim Zeitlin
fe944dec68 Only deploy the documentation from master
Don't do it for pull requests.

This check also seems to render the check for the repository owner
unnecessary, so drop it instead of keeping both.
2022-03-28 11:16:53 +02:00
Vadim Zeitlin
20b8ba1773 Add extra script to the docs created in GitHub Actions workflow
This was done by the cron job running in docs.wxwidgets.org before, so
keep doing it here.
2022-03-28 11:16:53 +02:00
Vadim Zeitlin
15ea25448f Fix accidentally wrapped line in the docs workflow 2022-03-28 11:16:53 +02:00
Vadim Zeitlin
79f6a2a158 Fix wxUILocale documentation formatting
Fix a few problems:

- Don't indent lists, as this makes them appear as code.
- Prefer using inline `...` to @code ... @endcode.
- Escape '<' and '>' characters.
2022-03-28 11:10:31 +02:00
Vadim Zeitlin
70e119140c Merge branch 'win-transparency'
Improve shaped sample and its documentation.

See #22230.
2022-03-28 00:16:31 +01:00
utelle
6d6e5cde21 Enhance wxUILocale and wxLocaleIdent
Many improvements and fixes to wxUILocale:

- Add wxUILocale method for retrieving wxLocaleIdent identifier,
  localized names, layout direction.
- Add wxLocaleIdent attributes, getter, and setter for
  platform-dependent tags under Windows: extension, sort order.
- Modify method wxLocaleIdent::FromTag to support not only BCP 47-like
  tags, but also platform-dependent syntax.
- Modify method wxLocaleIdent::GetTag to allow specifying the tag type.
- Update internat sample to better show using wxUILocale.
- Update German and French message catalogs for internat sample (German
  fully translated, French msgIds only).
- Introduced wxUILocaleImplStdC under Windows, because locale "en-US" is
  not equivalent to the C locale.
- Adjust wxLocale class to restore previous wxUILocale in the
  destructor.
- Implement wxLocale::GetInfo method through wxUILocale methods.
- Removed LCID dependency in wxLocale.
- Move the implementation of some static wxUILocale methods from
  intl.cpp to uilocale.cpp.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>

Closes #2615.
2022-03-28 01:11:40 +02:00
Vadim Zeitlin
891cbb1e0e Provide more details in the error message from wxwidgets.props
Give the full path of the directory where we failed to find the
libraries, as this can be useful to show what exactly are we looking
for.
2022-03-28 00:03:46 +01:00
Vadim Zeitlin
9e5c8a8027 Respect bitmap content scale factor in wxMSW wxMemoryDC
Apply it manually because MSW doesn't do it automatically for us and
also adjust the font size in wxMemoryDC as the base class version only
does it for the device contexts associated with a window, but we also
need to do it when using a wxMemoryDC for a bitmap using scale factor
different from that of the main display.

As the result of these changes, contents drawn on wxMemoryDC, both
directly via its own methods, or via wxGraphicsContext (using either
GDI+ or Direct2D) created from it, it appears the same as in wxWindowDC
(e.g. wxPaintDC) created for a window using the same scale.

Closes #22130.

Closes #22234.
2022-03-28 01:03:07 +02:00
Vadim Zeitlin
74fa410b81 Merge branch 'generic-dialogs-cleanup'
Simplify generic dialogs code and make them more consistent with each
other.
2022-03-28 00:58:44 +02:00
Vadim Zeitlin
f280bcdb58 Improve error reporting in wxDateTime unit tests
Simply use INFO() to give all the information we want to see in case of
failure once instead of doing it in multiple WX_ASSERT_MESSAGE() in a
more ugly way with extra parentheses.

Also use FAIL_CHECK() to keep running the test after the first failure.
2022-03-28 00:56:19 +02:00
Vadim Zeitlin
762c80b809 Handle --with-cxx=20 configure option too
Although wxWidgets doesn't use any C++20 features yet, still allow
compiling it in C++ 20 mode if wanted.

Update the helper macro for detecting available C++ version support from
https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
with just a minor change to de-TAB-ify it to pass our code style check
forbidding indenting with TABs.

Closes #22238.
2022-03-28 00:55:54 +02:00
Vadim Zeitlin
d47119680f Create bigger windows on high DPI screens in wxMSW by default
When using 200% DPI scaling, 400*250 windows are too small as almost
nothing fits into them, so use 800*500 size for them instead.

This is still completely arbitrary, but clearly better.

Closes #22235.
2022-03-28 00:55:54 +02:00
Andriy Byelikov
30e1ca49ae Update Catalan translations
Closes #22237.
2022-03-28 00:55:54 +02:00
Vadim Zeitlin
0390951677 Fix forwarding of menu commands in the richtext sample
Fall back on the main rich text control if there is no currently focused
window, as the control itself never has focus when a menu is opened with
wxGTK/Wayland, i.e. none of the menu commands, such as wxID_COPY/CUT,
worked for it in this case.

Closes #22121.
2022-03-28 00:55:54 +02:00
Vadim Zeitlin
7e45373e16 Add a simple workflow for updating HTML docs online
Run doxygen and copy the generated files to docs.wxwidgets.org.

Ignore the new workflow in all the existing CI ones, as changes to it
shouldn't require rerunning them.

See #19126.
2022-03-28 00:54:46 +02:00
Vadim Zeitlin
7769894304 Merge branch 'doxygen-fixes'
Fix several problems in Doxygen markup and update the required Doxygen
version to 1.8.17.

Closes #19126.
2022-03-28 00:47:28 +02:00
Vadim Zeitlin
c1ee60395a Change supported Doxygen version to 1.8.17
This is the version available in Ubuntu 20.04 which is currently used
both on docs.wxwidgets.org and in GitHub Actions Ubuntu environment, so
it looks like a reasonable choice, even though the latest version is
1.9.3.

Note that the versions earlier than 1.8.14 can't be used any longer
since the changes in the previous commit because "^^" in the aliases
definition don't work in them and result in garbled output.
2022-03-28 00:43:05 +02:00
Vadim Zeitlin
398af094cf Use "^^" instead of "\n" in Doxygen aliases
This is required with any version after 1.8.14.

Closes #2068.
2022-03-28 00:24:44 +02:00
Vadim Zeitlin
326077d574 Increase DOT_GRAPH_MAX_NODES Doxygen option for wxObject
There are more than 50 nodes in wxObject inheritance graph, so increase
this option value to allow generating it and avoid a warning about it.
2022-03-28 00:23:30 +02:00
Vadim Zeitlin
f8438dc4be Remove Doxygen options obsolete in 1.9.1
We don't use any of these options anyhow, so just remove them to avoid
warnings about them being obsolete now.
2022-03-28 00:22:40 +02:00
Vadim Zeitlin
6bc00ecc5d Remove top level directories from the paths in Doxygen log
Removing "docs/doxygen" and "interface" was both ambiguous (because it
wasn't immediately clear which file the message was referring to) and
insufficient because there are now Markdown files in the other other
directories used as Doxygen input too, and they still appeared with the
full paths.

Fix both problems by removing just the top level directory from all
paths and keeping all the rest.
2022-03-28 00:20:44 +02:00
Vadim Zeitlin
05612989f0 Fix escaping of new lines in wxRegEx documentation
There doesn't seem to be any way to use backslashes with @c: with a
single backslash, it's interpreted as a command, but a double backslash
appears in the output. So use `\b` instead of @c \b and also use `...`
elsewhere for consistency.

Also fix wxRE_NEWLINE description formatting.
2022-03-28 00:19:05 +02:00
Vadim Zeitlin
c6b5070083 Don't use non-existent "@this" command in wxUILocale docs
Just use `this` instead.
2022-03-28 00:18:39 +02:00
Vadim Zeitlin
19d477aabf Consistently escape "@" in wxRichTextCtrl documentation
The first occurrence of it was escaped, but the second one in each line
was not, resulting in warnings about "unknown command @:".
2022-03-28 00:18:02 +02:00
Vadim Zeitlin
7a269df2bf Document all parameters of wxImage::Paste()
As long as one parameter of a function is documented, all the other ones
should be documented too, as otherwise Doxygen complains about it not
being the case.
2022-03-28 00:17:26 +02:00
Vadim Zeitlin
a406e2a7dc Quote paths using backslashes in Doxygen input
Otherwise Doxygen interprets each path component as its command and
complains about "unknown \msw command" in "build\msw" path, for example.
2022-03-28 00:16:29 +02:00
Paul Cornett
9af728caea Minor simplification in generic wxCaret
Only create wxMemoryDC if it's actually needed.
2022-03-27 13:54:46 -07:00
Paul Cornett
03bf61be3c Fix drawing caret on GTK3 with GDK_SCALE=2
Don't use pen when drawing solid rectangle, avoids partial outline left on window.
2022-03-27 13:49:00 -07:00
Paul Cornett
0993d4f18e Make wxCaret init functions private
Init functions are not supposed to be called by derived classes,
they have already been called by the base ctors.
2022-03-27 13:07:37 -07:00
Gerhard Gruber
9dc7248b1d Add conversion to signed/unsigned int to wxString
Add wxString::ToInt() and ToUInt() for convenience and consistency with
the existing ToLong() and ToULong().

Closes #22068.
2022-03-26 00:46:58 +01:00
Paul Cornett
c10a70be67 Fix GTK version check 2022-03-25 12:01:12 -07:00
Paul Cornett
b3b43ad15b Fix drawing of TLW with wxBG_STYLE_TRANSPARENT on GTK
Default drawing of the background has to be disabled.
See #18592
2022-03-25 12:00:07 -07:00
Vadim Zeitlin
80a056a58b Improve "shaped" sample documentation
Also link to it from the functions shown in this sample.
2022-03-25 01:54:11 +01:00
Vadim Zeitlin
fffe5af903 Document SetTransparent() limitation under wxGTK
The first call to this function must happen before showing the window.
2022-03-25 01:48:16 +01:00
Vadim Zeitlin
279af795ed Make transparency window in the shaped sample work under MSW
Still show transparent window even if IsTransparentBackgroundSupported()
returns false, just don't make their background transparent and only use
SetTransparent() in this case. In fact, don't try to use transparent
background style at all by default and add a separate menu item to do it
if wanted.

Also add a slider to allow changing opacity of the window.

Finally, make the window big enough in high DPI under MSW by using
FromDIP().
2022-03-25 01:46:24 +01:00
Vadim Zeitlin
58800c09e4 Merge branch 'misc-dpi'
A couple of high DPI-related fixes.

See #22229.
2022-03-25 00:49:24 +01:00
Vadim Zeitlin
16d8e61d28 Render "Close" bitmap button correctly in high DPI
Define a custom wxBitmapBundle to represent this bitmap in order to be
able to draw it at any required size instead of scaling up the bitmap in
high DPI.

See #18822.
2022-03-24 21:40:44 +01:00
Vadim Zeitlin
debd3f338b Use high DPI icons in wxInfoBarGeneric if appropriate
Just switch to using wxArtProvider::GetBitmapBundle() instead of
GetBitmap() which returned standard-sized bitmap that was upscaled
later.

See #18822.
2022-03-24 21:40:44 +01:00