diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Main/Forms/MountOptionsDialog.cpp | 3 | ||||
-rw-r--r-- | src/Main/Forms/VolumePasswordPanel.cpp | 7 | ||||
-rw-r--r-- | src/Main/Forms/VolumePasswordPanel.h | 1 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/Main/Forms/MountOptionsDialog.cpp b/src/Main/Forms/MountOptionsDialog.cpp index 99355020..04410922 100644 --- a/src/Main/Forms/MountOptionsDialog.cpp +++ b/src/Main/Forms/MountOptionsDialog.cpp @@ -88,7 +88,8 @@ namespace VeraCrypt OptionsButton->SetLabel (OptionsButtonLabel + L" >"); OptionsPanel->Show (false); - ProtectionPasswordPanel = new VolumePasswordPanel (OptionsPanel, &options, options.ProtectionPassword, true, options.ProtectionKeyfiles, false, true, true, false, true, true, LangString["IDT_HIDDEN_PROT_PASSWD"]); + ProtectionPasswordPanel = new VolumePasswordPanel (ProtectionSizer->GetStaticBox(), &options, options.ProtectionPassword, true, options.ProtectionKeyfiles, false, true, true, false, true, true, LangString["IDT_HIDDEN_PROT_PASSWD"]); + ProtectionPasswordPanel->TopOwnerParent = this; ProtectionPasswordSizer->Add (ProtectionPasswordPanel, 1, wxALL | wxEXPAND); UpdateDialog(); diff --git a/src/Main/Forms/VolumePasswordPanel.cpp b/src/Main/Forms/VolumePasswordPanel.cpp index ac30075e..bb1f0c78 100644 --- a/src/Main/Forms/VolumePasswordPanel.cpp +++ b/src/Main/Forms/VolumePasswordPanel.cpp @@ -19,7 +19,7 @@ namespace VeraCrypt { VolumePasswordPanel::VolumePasswordPanel (wxWindow* parent, MountOptions* options, shared_ptr <VolumePassword> password, bool disableTruecryptMode, shared_ptr <KeyfileList> keyfiles, bool enableCache, bool enablePassword, bool enableKeyfiles, bool enableConfirmation, bool enablePkcs5Prf, bool isMountPassword, const wxString &passwordLabel) - : VolumePasswordPanelBase (parent), Keyfiles (new KeyfileList), EnablePimEntry (true) + : VolumePasswordPanelBase (parent), TopOwnerParent(NULL), Keyfiles (new KeyfileList), EnablePimEntry (true) { size_t maxPasswordLength = CmdLine->ArgUseLegacyPassword? VolumePassword::MaxLegacySize : VolumePassword::MaxSize; if (keyfiles) @@ -493,6 +493,7 @@ namespace VeraCrypt { if (EnablePimEntry) { + wxWindow* layoutParent = TopOwnerParent? TopOwnerParent : GetParent(); PimCheckBox->Show (false); VolumePimStaticText->Show (true); VolumePimTextCtrl->Show (true); @@ -506,8 +507,8 @@ namespace VeraCrypt Fit(); } - GetParent()->Layout(); - GetParent()->Fit(); + layoutParent->Layout(); + layoutParent->Fit(); } } diff --git a/src/Main/Forms/VolumePasswordPanel.h b/src/Main/Forms/VolumePasswordPanel.h index cac6c37b..e9b81e29 100644 --- a/src/Main/Forms/VolumePasswordPanel.h +++ b/src/Main/Forms/VolumePasswordPanel.h @@ -45,6 +45,7 @@ namespace VeraCrypt bool UpdatePimHelpText (bool pimChanged); Event UpdateEvent; + wxWindow* TopOwnerParent; // use to handle layout when embedded inside sizer child protected: void SetPimValidator (); |