Skip to content

Commit

Permalink
(GLC) Honkai: Fix panel not collapsing when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusnl committed Feb 13, 2024
1 parent 32cdb31 commit d72bca2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,39 +454,15 @@ public bool IsUseAdvancedSettings
get
{
bool value = Settings.SettingsCollapseMisc.UseAdvancedGameSettings;
if (value)
{
PreLaunchToggle.IsEnabled = true;
PostExitToggle.IsEnabled = true;
PreLaunchCommandTextBox.IsEnabled = true;
PostExitCommandTextBox.IsEnabled = true;
}
else
{
PreLaunchToggle.IsEnabled = false;
PostExitToggle.IsEnabled = false;
PreLaunchCommandTextBox.IsEnabled = false;
PostExitCommandTextBox.IsEnabled = false;
}
if (value){AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Visible;}
else AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Collapsed;
return value;
}
set
{
Settings.SettingsCollapseMisc.UseAdvancedGameSettings = value;
if (value)
{
PreLaunchToggle.IsEnabled = true;
PostExitToggle.IsEnabled = true;
PreLaunchCommandTextBox.IsEnabled = true;
PostExitCommandTextBox.IsEnabled = true;
}
else
{
PreLaunchToggle.IsEnabled = false;
PostExitToggle.IsEnabled = false;
PreLaunchCommandTextBox.IsEnabled = false;
PostExitCommandTextBox.IsEnabled = false;
}
if (value) AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Visible;
else AdvancedSettingsPanel.Visibility = Microsoft.UI.Xaml.Visibility.Collapsed;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@
OffContent="{x:Bind helper:Locale.Lang._Misc.Disabled}"
OnContent="{x:Bind helper:Locale.Lang._Misc.Enabled}" />
</Grid>
<StackPanel>
<StackPanel x:Name="AdvancedSettingsPanel">
<TextBlock Margin="0,0,0,8" TextWrapping="WrapWholeWords">
<Run Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle1}" />
<Run FontWeight="Bold" Text="{x:Bind helper:Locale.Lang._GameSettingsPage.Advanced_Subtitle2}" />
Expand Down

0 comments on commit d72bca2

Please sign in to comment.