1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-06-19 02:56:07 -05:00

macOS: Fix near zero width PIM input box and simplify wxTextValidator logic (#1274)

* macOS: Fix issue where PIM box has no width in Wizard
VolumePimTextCtrl has a problem with width on macOS which
we can fix by adjusting the proportions of the elements
inside the PimSizer, which seems like a better solution than
using a forced minimum size in pixels.

Adjacent, simplifies the validator logic for digits in PIM field.

Fixes #1219
This commit is contained in:
Jertzukka
2023-12-11 10:06:33 +02:00
committed by GitHub
parent 1a21ea8d73
commit ff93a6021f
4 changed files with 8 additions and 13 deletions
+4 -4
View File
@@ -45,10 +45,10 @@ namespace VeraCrypt
BufferSizeChoice->Select (1);
UpdateBenchmarkList ();
wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST); // wxFILTER_NUMERIC does not exclude - . , etc.
const wxChar *valArr[] = { L"0", L"1", L"2", L"3", L"4", L"5", L"6", L"7", L"8", L"9" };
validator.SetIncludes (wxArrayString (array_capacity (valArr), (const wxChar **) &valArr));
VolumePimText->SetMinSize (wxSize (Gui->GetCharWidth (VolumePimText) * 15, -1));
wxTextValidator validator (wxFILTER_DIGITS);
VolumePimText->SetValidator (validator);
Layout();