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

Dyn 3513 preferences modal dialog #11534

Merged
merged 21 commits into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5906c99
Revert "First version with migration from packages.config to package …
RobertGlobant20 Oct 29, 2020
d976238
Revert "Revert "First version with migration from packages.config to …
RobertGlobant20 Oct 29, 2020
31af193
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
RobertGlobant20 Nov 4, 2020
10935f9
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
RobertGlobant20 Feb 3, 2021
4f69c4e
Issues Type Predicter GitHub Action
RobertGlobant20 Feb 5, 2021
85d1a54
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
RobertGlobant20 Feb 8, 2021
5a3bd35
Fix for the GitHub token
RobertGlobant20 Feb 8, 2021
aab6d6e
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
RobertGlobant20 Feb 15, 2021
296e3c6
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
RobertGlobant20 Feb 23, 2021
f5b3c67
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
RobertGlobant20 Feb 25, 2021
989ad64
DYN-3513 - new modal dialog for preferences
RobertGlobant20 Mar 3, 2021
9bb71e8
DYN-3513 - new modal dialog for preferences
RobertGlobant20 Mar 4, 2021
46b41f6
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
RobertGlobant20 Mar 4, 2021
f9bfa47
Merge branch 'master' into DYN-3513-PreferencesModalDialog
RobertGlobant20 Mar 4, 2021
7aa4cfb
DYN-3513 - updating branch with latest code in master
RobertGlobant20 Mar 4, 2021
04f46fa
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
RobertGlobant20 Mar 4, 2021
bcbd4e7
Merge branch 'master' into DYN-3513-PreferencesModalDialog
RobertGlobant20 Mar 4, 2021
49c7d32
DYN-3513 - Fixing the drag & drop
RobertGlobant20 Mar 4, 2021
cd1afc2
Removing changes in Assembly file
RobertGlobant20 Mar 4, 2021
551c610
DYN-3513 - Fixing code review comments
RobertGlobant20 Mar 5, 2021
eb0d517
DYN-3513 - Fixing code review comments
RobertGlobant20 Mar 8, 2021
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
7 changes: 7 additions & 0 deletions src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@
</Compile>
<Compile Include="ViewModels\Watch3D\AttachedProperties.cs" />
<Compile Include="ViewModels\Watch3D\DynamoEffectsManager.cs" />
<Compile Include="Views\Menu\PreferencesView.xaml.cs">
<DependentUpon>PreferencesView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Preview\CameraExtensions.cs" />
<Compile Include="Views\Preview\PreviewCompactView.xaml.cs">
<DependentUpon>PreviewCompactView.xaml</DependentUpon>
Expand Down Expand Up @@ -436,6 +439,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Menu\PreferencesView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Windows\ExtensionWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down
36 changes: 36 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.

12 changes: 12 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2297,4 +2297,16 @@ Uninstall the following packages: {0}?</value>
<value>_Export</value>
<comment>File menu | Export</comment>
</data>
<data name="PreferencesViewFeaturesTab" xml:space="preserve">
<value>Features</value>
</data>
<data name="PreferencesViewGeneralTab" xml:space="preserve">
<value>General</value>
</data>
<data name="PreferencesViewTitle" xml:space="preserve">
<value>Preferences</value>
</data>
<data name="PreferencesViewVisualSettingsTab" xml:space="preserve">
<value>Visual Settings</value>
</data>
</root>
12 changes: 12 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2299,4 +2299,16 @@ Uninstall the following packages: {0}?</value>
<value>_Export</value>
<comment>File menu | Export</comment>
</data>
<data name="PreferencesViewFeaturesTab" xml:space="preserve">
<value>Features</value>
</data>
<data name="PreferencesViewGeneralTab" xml:space="preserve">
<value>General</value>
</data>
<data name="PreferencesViewTitle" xml:space="preserve">
<value>Preferences</value>
</data>
<data name="PreferencesViewVisualSettingsTab" xml:space="preserve">
<value>Visual Settings</value>
</data>
</root>
186 changes: 186 additions & 0 deletions src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2263,5 +2263,191 @@
</Setter.Value>
</Setter>
</Style>

<SolidColorBrush x:Key="PreferencesWindowBackgroundColor"
Color="#535353" />
<SolidColorBrush x:Key="PreferencesWindowFontColor"
Color="#E5E5E5" />
<SolidColorBrush x:Key="PreferencesWindowButtonColor"
Color="#0696D7" />
<SolidColorBrush x:Key="PreferencesWindowButtonPressedColor"
Color="#0778B0" />
<SolidColorBrush x:Key="PreferencesWindowButtonMouseOverFontColor"
Color="#CDCBCB" />
<SolidColorBrush x:Key="CloseButtonMouseOverBackground"
Color="#E81123" />
<SolidColorBrush x:Key="CloseButtonPressed"
Color="#B70F1B" />
<SolidColorBrush x:Key="CloseButtonMouseOverForeground"
Color="#FFFFFF" />
<SolidColorBrush x:Key="TabItemUnSelected"
Color="DarkGray" />

<Style x:Key="CaptionButtonStyleClose"
TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="LayoutRoot"
Background="Transparent"
Width="46"
Height="40">
<TextBlock x:Name="txt"
Text="{TemplateBinding Content}"
FontFamily="Segoe MDL2 Assets"
FontSize="14"
Foreground="{StaticResource PreferencesWindowFontColor}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RenderOptions.ClearTypeHint="Auto"
TextOptions.TextRenderingMode="Aliased"
TextOptions.TextFormattingMode="Display"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter TargetName="LayoutRoot"
Property="Background"
Value="{StaticResource CloseButtonMouseOverBackground}"/>
<Setter TargetName="txt"
Property="Foreground"
Value="{StaticResource CloseButtonMouseOverForeground}"/>
</Trigger>
<Trigger Property="IsPressed"
Value="True">
<Setter TargetName="LayoutRoot"
Property="Background"
Value="{StaticResource CloseButtonPressed}"/>
<Setter TargetName="txt"
Property="Foreground"
Value="{StaticResource CloseButtonMouseOverForeground}"/>
<Setter TargetName="txt"
Property="FontSize"
Value="12"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="CloseButtonStyle"
TargetType="Button"
BasedOn="{StaticResource CaptionButtonStyleClose}">
<Setter Property="Content"
Value="&#xE8BB;"/>
</Style>

<Style x:Key="NormalButtonStyle"
TargetType="Button">
<Setter Property="Foreground"
Value="{StaticResource PreferencesWindowFontColor}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Name="border"
Background="{StaticResource PreferencesWindowButtonColor}"
BorderThickness="1"
Padding="4,2"
BorderBrush="Transparent"
CornerRadius="3">
<Grid >
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"
Name="contentShadow">
</ContentPresenter>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed"
Value="True">
<Setter TargetName="border"
Property="Background"
Value="{StaticResource PreferencesWindowButtonPressedColor}" />
<Setter Property="FontSize"
Value="11"/>
</Trigger>
<Trigger Property="IsMouseOver"
Value="True">
<Setter TargetName="border"
Property="Background"
Value="{StaticResource PreferencesWindowButtonPressedColor}" />
<Setter Property="Foreground"
Value="{StaticResource PreferencesWindowButtonMouseOverFontColor}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate >
</Setter.Value>
</Setter>
</Style>

<Style x:Key="LeftTab"
TargetType="{x:Type TabItem}">
<Setter Property="HorizontalAlignment"
Value="Left"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Border Margin="2"
Name="TabBorder"
CornerRadius="6"
BorderBrush="Transparent"
Background="Transparent"
BorderThickness="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid Name="TabPanel"
Width="100"
Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label x:Name="SelectedItem"
Grid.Column="0"/>
<ContentPresenter x:Name="ContentSection"
Grid.Column="1"
ContentSource="Header"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Margin="5,0,0,0"/>
</Grid>
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected"
Value="True">
<Setter TargetName="SelectedItem"
Property="Background"
Value="{StaticResource PreferencesWindowButtonColor}" />
<Setter Property="Foreground"
Value="{StaticResource PreferencesWindowFontColor}" />
<Setter Property="FontWeight"
Value="Bold" />
</Trigger>
<Trigger Property="IsSelected"
Value="False">
<Setter TargetName="SelectedItem"
Property="Background"
Value="{StaticResource PreferencesWindowBackgroundColor}" />
<Setter Property="Foreground"
Value="{StaticResource TabItemUnSelected}" />
<Setter Property="FontWeight"
Value="Bold" />
</Trigger>
<Trigger Property="Border.IsMouseOver"
Value="True">
<Setter TargetName="TabBorder"
Property="Background"
Value="{StaticResource PreferencesWindowButtonPressedColor}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

</ResourceDictionary>
1 change: 1 addition & 0 deletions src/DynamoCoreWpf/Views/Core/DynamoView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@
Focusable="False" />
<MenuItem Header="{x:Static p:Resources.DynamoViewDynamoMenuPreferences}"
Focusable="False"
Click="OnPreferencesWindowClick"
Visibility="Collapsed"
Name="preferencesOption"/>
<Separator />
Expand Down
9 changes: 9 additions & 0 deletions src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
using Dynamo.Wpf.Extensions;
using Dynamo.Wpf.Utilities;
using Dynamo.Wpf.ViewModels.Core;
using Dynamo.Wpf.Views;
using Dynamo.Wpf.Views.Debug;
using Dynamo.Wpf.Views.Gallery;
using Dynamo.Wpf.Views.PackageManager;
Expand Down Expand Up @@ -1847,6 +1848,14 @@ private void OnDebugModesClick(object sender, RoutedEventArgs e)
debugModesWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
debugModesWindow.ShowDialog();
}

private void OnPreferencesWindowClick(object sender, RoutedEventArgs e)
{
var preferencesWindow = new PreferencesWindow();
preferencesWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
preferencesWindow.ShowDialog();
}

/// <summary>
/// Setup the "Samples" sub-menu with contents of samples directory.
/// </summary>
Expand Down
Loading