mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-30 08:55:39 +08:00
(SettingsWindow): some tweaks.
This commit is contained in:
parent
8d4cb0567f
commit
33ffb0da6f
@ -46,6 +46,7 @@ IN THE SOFTWARE.
|
||||
<CheckBox DataContext="{TemplateBinding DataContext}" IsChecked="{Binding Value}"
|
||||
Content="{Binding Text}" ToolTip="{Binding Description}" Margin="2"/>
|
||||
</ControlTemplate>
|
||||
<TextBlock x:Key="FormatsPanel" Text="Not much settings implemented so far."/>
|
||||
|
||||
<Style x:Key="ExpandCollapseToggleStyle" TargetType="ToggleButton">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
@ -170,7 +171,7 @@ IN THE SOFTWARE.
|
||||
<StackPanel Orientation="Vertical" DataContext="{Binding ElementName=SectionsPane,Path=SelectedItem}">
|
||||
<TextBlock Text="{Binding SectionTitle}" Background="{StaticResource SectionTitleBackground}"
|
||||
FontWeight="Bold" FontSize="14" Padding="2,0,2,0" Margin="0,0,0,4"/>
|
||||
<StackPanel x:Name="SettingsPane"/>
|
||||
<Decorator x:Name="SettingsPane"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user