From ff93a6021fb744466661b666123dda96ecef5aba Mon Sep 17 00:00:00 2001 From: Jertzukka Date: Mon, 11 Dec 2023 10:06:33 +0200 Subject: 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 --- src/Main/Forms/VolumeSizeWizardPage.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/Main/Forms/VolumeSizeWizardPage.cpp') diff --git a/src/Main/Forms/VolumeSizeWizardPage.cpp b/src/Main/Forms/VolumeSizeWizardPage.cpp index 83fdd40f..08aa7052 100644 --- a/src/Main/Forms/VolumeSizeWizardPage.cpp +++ b/src/Main/Forms/VolumeSizeWizardPage.cpp @@ -73,9 +73,7 @@ namespace VeraCrypt VolumeSizeTextCtrl->SetMinSize (wxSize (Gui->GetCharWidth (VolumeSizeTextCtrl) * 20, -1)); - 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)); + wxTextValidator validator (wxFILTER_DIGITS); VolumeSizeTextCtrl->SetValidator (validator); } -- cgit v1.2.3