diff options
Diffstat (limited to 'src/Main/Forms/VolumePimWizardPage.cpp')
-rw-r--r-- | src/Main/Forms/VolumePimWizardPage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Main/Forms/VolumePimWizardPage.cpp b/src/Main/Forms/VolumePimWizardPage.cpp index 8ce23043..7ef8a3a0 100644 --- a/src/Main/Forms/VolumePimWizardPage.cpp +++ b/src/Main/Forms/VolumePimWizardPage.cpp @@ -50,71 +50,71 @@ namespace VeraCrypt } void VolumePimWizardPage::SetVolumePim (int pim) { if (pim > 0) { VolumePimTextCtrl->SetValue (StringConverter::FromNumber (pim)); } else { VolumePimTextCtrl->SetValue (wxT("")); } OnPimValueChanged (pim); } bool VolumePimWizardPage::IsValid () { return true; } void VolumePimWizardPage::OnPimChanged (wxCommandEvent& event) { OnPimValueChanged (GetVolumePim ()); } void VolumePimWizardPage::OnPimValueChanged (int pim) { if (pim > 0) { VolumePimHelpStaticText->SetForegroundColour(*wxRED); VolumePimHelpStaticText->SetLabel(LangString["PIM_CHANGE_WARNING"]); } else { - VolumePimHelpStaticText->SetForegroundColour(*wxBLACK); + VolumePimHelpStaticText->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); VolumePimHelpStaticText->SetLabel(LangString["IDC_PIM_HELP"]); } Fit(); Layout(); } void VolumePimWizardPage::SetPimValidator () { 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)); VolumePimTextCtrl->SetValidator (validator); } void VolumePimWizardPage::OnDisplayPimCheckBoxClick( wxCommandEvent& event ) { FreezeScope freeze (this); bool display = event.IsChecked (); wxTextCtrl *newTextCtrl = new wxTextCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, display ? 0 : wxTE_PASSWORD); newTextCtrl->SetMaxLength (MAX_PIM_DIGITS); newTextCtrl->SetValue (VolumePimTextCtrl->GetValue()); newTextCtrl->SetMinSize (VolumePimTextCtrl->GetSize()); PimSizer->Replace (VolumePimTextCtrl, newTextCtrl); VolumePimTextCtrl->Show (false); VolumePimTextCtrl->SetValue (wxString (L'X', VolumePimTextCtrl->GetLineLength(0))); GetVolumePim (); Fit(); Layout(); newTextCtrl->SetMinSize (VolumePimTextCtrl->GetMinSize()); newTextCtrl->Connect (wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler (VolumePimWizardPage::OnPimChanged), nullptr, this); |