(SettingsWindow): some tweaks.

This commit is contained in:
morkt
2018-01-11 18:45:23 +04:00
parent 8d4cb0567f
commit 33ffb0da6f
2 changed files with 6 additions and 4 deletions

View File

@@ -52,10 +52,10 @@ namespace GARbro.GUI
private void OnSectionChanged (object sender, System.Windows.RoutedEventArgs e)
{
this.SettingsPane.Children.Clear();
this.SettingsPane.Child = null;
var section = SectionsPane.SelectedValue as SettingsSectionView;
if (section != null && section.Panel != null)
this.SettingsPane.Children.Add (section.Panel);
this.SettingsPane.Child = section.Panel;
}
private void Button_ClickApply (object sender, System.Windows.RoutedEventArgs e)
@@ -86,7 +86,8 @@ namespace GARbro.GUI
SettingsSectionView[] list = {
new SettingsSectionView {
Label = "Formats",
Children = EnumerateFormatsSettings()
Children = EnumerateFormatsSettings(),
Panel = (UIElement)this.Resources["FormatsPanel"]
},
};
SettingsSectionView selected_section = null;