Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new package manager prefs section #11734

Merged
merged 2 commits into from
Jun 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2399,4 +2399,10 @@ Uninstall the following packages: {0}?</value>
<data name="ResetCPythonButtonToolTip" xml:space="preserve">
<value>Resets CPython environment by reloading modules.</value>
</data>
<data name="PackagePathsExpanderName" xml:space="preserve">
<value>Node and Package Paths</value>
</data>
<data name="PreferencesPackageManagerSettingsTab" xml:space="preserve">
<value>Package Manager</value>
</data>
</root>
6 changes: 6 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2399,4 +2399,10 @@ Uninstall the following packages: {0}?</value>
<data name="ResetCPythonButtonToolTip" xml:space="preserve">
<value>Resets CPython environment by reloading modules.</value>
</data>
<data name="PackagePathsExpanderName" xml:space="preserve">
<value>Node and Package Paths</value>
</data>
<data name="PreferencesPackageManagerSettingsTab" xml:space="preserve">
<value>Package Manager</value>
mjkkirschner marked this conversation as resolved.
Show resolved Hide resolved
</data>
</root>
2 changes: 1 addition & 1 deletion src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2501,7 +2501,7 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid Name="TabPanel"
Width="100"
Width="150"
Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5" />
Expand Down
40 changes: 38 additions & 2 deletions src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
Margin="0,0,8,0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Click="removeStyle_Click"
Click="RemoveStyle_Click"
Style="{StaticResource RemoveStyleButtonStyle}"
Width="20"
Height="30">
Expand Down Expand Up @@ -574,7 +574,7 @@
<Button x:Name="buttonColorPicker"
Style="{StaticResource ButtonColorPickerStyle}"
Background="{Binding AddStyleControl.HexColorString}"
Click="buttonColorPicker_Click"
Click="ButtonColorPicker_Click"
Width="25"
Height="15"/>
<Label x:Name="colorHexVal"
Expand Down Expand Up @@ -698,6 +698,42 @@
</Expander>
</Grid>
</TabItem>

<!--Package Manager Settings Tab-->
<TabItem Header="{x:Static p:Resources.PreferencesPackageManagerSettingsTab}"
Style="{StaticResource LeftTab}">
<!--This Grid contains the package mangager settings tab-->
<Grid x:Name="PackageManagerTab"
Margin="1"
HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<!--This Grid row contains the Package Paths section-->
<Expander x:Name="PackagePathsExpander"
Grid.Row="0"
Style="{StaticResource MenuExpanderStyle}"
IsExpanded="{Binding PreferencesTabs[Features].ExpanderActive, Converter={StaticResource ExpandersBindingConverter}, ConverterParameter=PackagePathsExpander}"
Header="{x:Static p:Resources.PackagePathsExpanderName}">
<StackPanel Orientation="Vertical" Margin="0,6,0,0">
<Label>SOME CONTENT</Label>
</StackPanel>
</Expander>

<!--This Grid row contains the Installed Packages section-->
<Expander x:Name="InstalledPackagesExpander"
Style="{StaticResource MenuExpanderStyle}"
IsExpanded="{Binding PreferencesTabs[Features].ExpanderActive, Converter={StaticResource ExpandersBindingConverter}, ConverterParameter=InstalledPackagesExpander}"
Grid.Row="1"
Header="{x:Static p:Resources.InstalledPackageViewTitle}">
<StackPanel Orientation="Vertical" Margin="0,6,0,0">
<Label>SOME CONTENT</Label>
</StackPanel>
</Expander>
</Grid>
</TabItem>
</TabControl>
</Grid>
</Grid>
Expand Down
9 changes: 4 additions & 5 deletions src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ namespace Dynamo.Wpf.Views
/// </summary>
public partial class PreferencesView : Window
{
private List<Expander> allExpandersList;
mjkkirschner marked this conversation as resolved.
Show resolved Hide resolved
private readonly PreferencesViewModel viewModel;
private readonly DynamoViewModel dynViewModel;

Expand Down Expand Up @@ -62,9 +61,9 @@ private void InitRadioButtonsDescription()
RadioMediumDesc.Inlines.Add(new Run(Res.ChangeScaleFactorPromptDescriptionDefaultSetting) { FontWeight = FontWeights.Bold });
RadioMediumDesc.Inlines.Add(" " + viewModel.OptionsGeometryScale.DescriptionScaleRange[1]);

RadioLargeDesc.Inlines.Add(viewModel.OptionsGeometryScale.DescriptionScaleRange[1]);
RadioLargeDesc.Inlines.Add(viewModel.OptionsGeometryScale.DescriptionScaleRange[2]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geometry scaling descriptions were repeated for medium and large, and extra large was wrong.


RadioExtraLargeDesc.Inlines.Add(viewModel.OptionsGeometryScale.DescriptionScaleRange[2]);
RadioExtraLargeDesc.Inlines.Add(viewModel.OptionsGeometryScale.DescriptionScaleRange[3]);
}

/// <summary>
Expand Down Expand Up @@ -142,7 +141,7 @@ private void AddStyle_CancelButton_Click(object sender, RoutedEventArgs e)
viewModel.ResetAddStyleControl();
}

private void removeStyle_Click(object sender, RoutedEventArgs e)
private void RemoveStyle_Click(object sender, RoutedEventArgs e)
{
var removeButton = sender as Button;

Expand All @@ -156,7 +155,7 @@ private void removeStyle_Click(object sender, RoutedEventArgs e)
viewModel.RemoveStyleEntry(groupNameLabel.Content.ToString());
}

private void buttonColorPicker_Click(object sender, RoutedEventArgs e)
private void ButtonColorPicker_Click(object sender, RoutedEventArgs e)
{
System.Windows.Forms.ColorDialog colorDialog = new System.Windows.Forms.ColorDialog();

Expand Down