VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2022-02-19 22:33:47 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2022-02-19 22:35:34 +0100
commitc145b337cbc5d7c8dc09859d51093a6727005ef8 (patch)
tree0e6dfccfa2cdcd3c5f1cd1e2055bb8f0acdc6ca2
parentc68e982f39af58d4ab26d8bb9f703496ccb06043 (diff)
downloadVeraCrypt-c145b337cbc5d7c8dc09859d51093a6727005ef8.tar.gz
VeraCrypt-c145b337cbc5d7c8dc09859d51093a6727005ef8.zip
Linux/MacOSX: Fix hidden volume settings not correctly displayed when enabling hidden volume protection in mount options window
-rw-r--r--src/Main/Forms/MountOptionsDialog.cpp3
-rw-r--r--src/Main/Forms/VolumePasswordPanel.cpp7
-rw-r--r--src/Main/Forms/VolumePasswordPanel.h1
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
@@ -90,3 +90,4 @@ namespace VeraCrypt
- 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);
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
@@ -21,3 +21,3 @@ 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)
{
@@ -495,2 +495,3 @@ namespace VeraCrypt
{
+ wxWindow* layoutParent = TopOwnerParent? TopOwnerParent : GetParent();
PimCheckBox->Show (false);
@@ -508,4 +509,4 @@ namespace VeraCrypt
- 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
@@ -47,2 +47,3 @@ namespace VeraCrypt
Event UpdateEvent;
+ wxWindow* TopOwnerParent; // use to handle layout when embedded inside sizer child