Commit Graph
25 Commits
Author SHA1 Message Date
Richard 035b8ad99f tests: Add TempDir::IsOk()
Add a small helper for checking whether TempDir was created successfully and
use it instead of checking the temporary directory name directly.
2026-08-13 21:42:14 -06:00
Richard 77c4110762 tests/controls: Fix GUI test assumptions exposed on MSW
Focus the native edit child when testing wxComboBox Enter handling on MSW,
where wxEVT_TEXT_ENTER is generated from the edit control's character message.
Also split Return simulation into key down/yield/key up so the native message
sequence is observed.

Make the other control tests less dependent on platform-specific details:
check visibility of the actual selected grid endpoint instead of a
DPI-sensitive nearby cell, and allow wxDataViewCtrl to report more than one
key-down event.
2026-08-13 21:42:14 -06:00
Richard abcca3c5f9 tests/graphics: Compare restored DC font with realized font
Some DC implementations can normalize the requested font when it is selected
into the DC. Save the font actually returned by the DC after applying the
font changer, and verify that clipping restores that realized font.
2026-08-13 21:42:14 -06:00
Richard 93e892c33f tests/net: Fix webrequest tests with current httpbin
Make auth and DELETE response checks independent of JSON whitespace, preserve
the base URL path when redirecting to basic auth, and skip digest auth only
with the default public httpbin mirror and WinHTTP backend.
2026-08-13 21:42:14 -06:00
Richard 1b65a101a3 tests/exec: Fix MSW async process termination tests
Use a non-interactive command for async wxExecute tests on MSW and accept the
existing SIGKILL fallback when SIGTERM is not supported.
2026-08-13 21:42:10 -06:00
Richard 7cdd9fb63f tests: Add shared temporary directory helper
Add a TempDir test helper that creates a unique temporary directory and
removes it recursively when it goes out of scope.

Use it in archive, intl, filename and fswatcher tests instead of open-coding
temporary directory creation with CreateTempFileName(), tempnam(), mkdtemp()
or fixed names under the temporary directory.
2026-08-13 21:29:42 -06:00
Richard 6e1ba7e61f tests/intl: isolate translation catalog tests
Use a temporary test-only catalog domain so translation tests do not pick
up sample internat catalogs copied into the same output tree.
2026-08-13 21:29:38 -06:00
Richard 920ed6b085 tests/drawing: tolerate missing generated drawing references
Prefer drawing references beside the test binary in multi-config builds.
In automatic runs, skip comparisons when the platform-specific reference
image is missing instead of failing the whole suite.
2026-08-13 21:19:15 -06:00
Richard 494967433b tests/archive: Rename CMake HTML zip sample output to htmlzip
Avoid placing the HTML zip sample executable beside test_base as zip.exe,
where the archive tests can mistake it for an external ZIP tool.

Keep the sample source directory as samples/html/zip and only rename the
CMake target/output.
2026-08-13 21:19:14 -06:00
RichardandVadim Zeitlin b3e0e4cde1 Refresh wxGrid editor on resize
Reposition the active cell editor after wxGrid resizes its child
windows, keeping the editor inside the visible grid window and
refreshing the old editor area.

Add a GUI regression test that shrinks the grid while editing and
checks that the editor remains visible in the grid window.

Fixes #2678.

Closes #26724.
2026-08-10 16:54:20 +02:00
RichardandVadim Zeitlin 06fee4f067 Return generic icon location for .exe file types in wxMSW
Handle executable DefaultIcon values such as %1/%L by asking the
shell for an icon location and falling back to the stock application
icon when SHGetFileInfo() does not provide a file/index location.

Add a base test covering the .exe icon location path.

Fixes #21794.

Closes #26673.
2026-07-22 00:10:18 +02:00
RichardandVadim Zeitlin 5d0a9f3a43 Fix wxHTML nested definition-list indentation
Track the active DL nesting depth while parsing definition lists and
use it when indenting DD content, so nested definition lists are laid
out deeper than their parent item. Add parser coverage and a sample
case for the old nested DL repro.

Fixes #20752.

Closes #26676.
2026-07-21 18:56:15 +02:00
RichardandVadim Zeitlin 9857cab934 Fix wxHTML line breaks around NBSP-only segments
Preserve non-breaking spaces in wxHtmlWinParser instead of converting them
to normal spaces, and prevent wxHtmlWordCell from allowing a line break
before NBSP-only text segments.

Add a parser regression test covering an  -only segment between words.

Fixes #20399.

Closes #26678.
2026-07-20 21:01:39 +02:00
RichardandVadim Zeitlin 272da6bcff Fix wxHTML BODY background colour in print rendering
Store BODY BGCOLOR in the wxHTML parser state even when there is no
window interface, then carry the parsed colour onto the renderer root
cell so wxHtmlDCRenderer fills printed pages with it instead of white.

Add a renderer regression test covering BODY BGCOLOR output.

Fixes #20652.

Closes #26677.
2026-07-20 20:53:16 +02:00
RichardandVadim Zeitlin c250dfb706 Fix HTML MIME fallback without registry content type
Let wxFileSystemHandler fall back to its built-in extension MIME map
when the MIME manager finds a file type but cannot return a MIME type.
This keeps .htm and .html files recognized as text/html on stripped
Windows systems missing the registry Content Type value.

Fixes #20967.

Closes #26675.
2026-07-20 20:42:00 +02:00
RichardandVadim Zeitlin e04e3260fc Handle context-help mouse capture loss
End wxContextHelp mode when mouse capture is lost and only release the
mouse if the help window still owns capture after the modal help loop.
Add coverage for the capture-loss path so context help exits without
using another input event.

Fixes #21534.

Closes #26674.
2026-07-20 20:35:07 +02:00
RichardandVadim Zeitlin 4e9b924ec6 HTML: Honor TABLE ALIGN as table placement
Apply TABLE ALIGN to the wrapper that positions the table instead of
using it as the default alignment for TD/TH content. Leave cell text
alignment controlled by row/cell alignment, with the existing TH default.

Add a parser layout regression test and sample markup for the centered
table case.

Fixes #21853.

Closes #26672.
2026-07-20 20:23:34 +02:00
RichardandVadim Zeitlin 34191600f2 Fix generic calendar day colour painting
Reset the default text foreground and background before drawing each
calendar day, using the control colours instead of the cached system
background. This prevents selected, surrounding, or attributed dates from
leaking colour state into neighbouring day cells on non-default colours.

Fixes #21885.

Closes #26671.
2026-07-20 20:17:31 +02:00
RichardandVadim Zeitlin fbc474f4ed Track active wxGrid editor while editing
Remember the editor instance used for the shown edit control and use it
for visibility checks, painting, hiding, and saving. This keeps the edit
control lifetime independent of later attribute changes, so replacing a
cell or column editor while editing does not make wxGrid hide or save
through the wrong editor.

Add a regression covering replacement of a column bool editor while its
cell is being edited.

Fixes #21986.

Closes #26670.
2026-07-20 20:12:44 +02:00
RichardandVadim Zeitlin cb77a4e904 Correct wxHTML IMG ALIGN=CENTER placement
Capture the current text metrics when parsing image cells and use them to
position ALIGN=CENTER images relative to the surrounding text center and
not to the total cell height.

Add a parser regression test for the image and adjacent word vertical
centers.

Fixes #2976.

Closes #26669.
2026-07-20 20:06:14 +02:00
Richard 6243faa945 Drop unused variable 2026-04-28 20:43:29 -06:00
Richard 084be11ee7 Specify imperial units in page setup dialog when page size is imperial
Fixes #9177
2026-04-28 20:33:31 -06:00
Richard fecee7773a Replace \275 (DOS character code for 1/2) with .5 in page size comments 2026-04-28 15:17:24 -06:00
RichardandVadim Zeitlin 745ea8dd1f Correct name of user CMake presets file
There was a typo in this file name when it was added in 7f2268c4a0 (Add
CMakePresets.json, 2023-03-09).

See #23335.

Closes #25826.
2025-09-23 15:04:07 +02:00
RichardandVadim Zeitlin 02cd327f0e Document that wxIMPLEMENT_APP must be used in global scope
As this macro defines main(), it can't be used inside any namespace.

Closes #25772.

Closes #25775.
2025-09-08 23:07:17 +02:00