From d045a47ad7363e62b763013fa6afcdb1762a7ce3 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 11 Aug 2019 16:48:35 +0300 Subject: Machine Studio : added configuration for dark /light theme --- .../Controls/HiveComboControl.xaml | 2 +- .../Controls/MachineView.xaml | 12 +- .../MachineStudioSettings.cs | 6 + .../MachineStudioTheme.cs | 14 + .../Resources/MaterialDesign.xaml | 17 +- .../Resources/SharedResourceDictionary.cs | 6 + .../Tango.MachineStudio.Common.csproj | 5 + .../Themes/DarkThemeColors.xaml | 301 +++++++++++++++++++++ .../Themes/LightThemeColors.xaml | 93 +++++-- 9 files changed, 425 insertions(+), 31 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioTheme.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml index 7f135efbc..cd218f663 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveComboControl.xaml @@ -39,7 +39,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineView.xaml index 6f352f35c..013dca6ce 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineView.xaml @@ -39,7 +39,7 @@ - + @@ -174,7 +174,7 @@ - NO IDS PACKS + NO IDS PACKS @@ -195,7 +195,7 @@ - + @@ -238,7 +238,7 @@ - + @@ -247,7 +247,7 @@ - + @@ -255,7 +255,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs index 0433ff7be..2920c8dd9 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs @@ -135,6 +135,11 @@ namespace Tango.MachineStudio.Common return DeploymentSlot.ToAddress(); } + /// + /// Gets or sets the working theme. + /// + public MachineStudioTheme Theme { get; set; } + /// /// Initializes a new instance of the class. /// @@ -149,6 +154,7 @@ namespace Tango.MachineStudio.Common JobUploadStrategy = JobUploadStrategy.JobDescriptionFile; MaximumCacheTime = TimeSpan.FromMinutes(5); CachingMode = ObservablesContextInMemoryCachingMode.None; + Theme = MachineStudioTheme.Light; } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioTheme.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioTheme.cs new file mode 100644 index 000000000..16dda143b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioTheme.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.Common +{ + public enum MachineStudioTheme + { + Light, + Dark + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml index 03c6649d6..0bf472a2e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -24,11 +24,12 @@ - - - - + + @@ -139,9 +140,9 @@ AllowsTransparency="True" PopupAnimation="Slide" Focusable="False"> - @@ -286,7 +287,7 @@ - + @@ -477,7 +478,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs index 6b1a86741..d422df26c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; +using Tango.Settings; namespace Tango.MachineStudio.Common.Resources { @@ -34,6 +35,11 @@ namespace Tango.MachineStudio.Common.Resources set { _sourceUri = value; + var settings = SettingsManager.Default.GetOrCreate(); + //add current theme + MachineStudioTheme wTheme = settings.Theme; + if ((wTheme == MachineStudioTheme.Dark && value.LocalPath.Contains("Light")) || (wTheme == MachineStudioTheme.Light && value.LocalPath.Contains("Dark"))) + return; if (!_sharedDictionaries.ContainsKey(value)) { diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index c368a499c..62f2dc984 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -93,6 +93,7 @@ + @@ -186,6 +187,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml new file mode 100644 index 000000000..ad8f0f09b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml @@ -0,0 +1,301 @@ + + + + + + + + + 0.7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #5C5C5C + #5C5C5C + #5C5C5C + #FF03A9F4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml index 90b3b0829..25f72f8d4 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml @@ -1,9 +1,14 @@  + xmlns:local="clr-namespace:Tango.MachineStudio.Common.Themes" + xmlns:system="clr-namespace:System;assembly=mscorlib"> + + + - + 1 + @@ -44,9 +49,7 @@ - - - + @@ -73,6 +76,13 @@ + + + + + + + @@ -87,26 +97,49 @@ - - + - + + + + - + - + + + - - - + + + + + + + + + + + + + + + - + + + + + + + + @@ -153,6 +186,34 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.3.1 From d2e231dbe55d7fcae6aa53caf78f72bd58784a98 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 13 Aug 2019 18:00:24 +0300 Subject: Added TransparentComboBoxStyle style --- .../Views/MainView.xaml | 4 +- .../Views/EventDetailsView.xaml | 2 +- .../Views/MachineSettingsView.xaml | 12 +- .../Views/MachineVersionDialog.xaml | 2 +- .../Resources/MaterialDesign.xaml | 320 +++++++++++++++++---- .../Themes/DarkThemeColors.xaml | 2 +- .../Themes/LightThemeColors.xaml | 1 + 7 files changed, 272 insertions(+), 71 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml index f4fa039dc..49966bad2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml @@ -71,7 +71,7 @@ TARGET MACHINE - + @@ -86,7 +86,7 @@ MEDIA - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml index d9a806a2a..4031c9ce3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventDetailsView.xaml @@ -10,7 +10,7 @@ xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:local="clr-namespace:Tango.MachineStudio.Logging.Views" mc:Ignorable="d" - Height="500" Width="800" Background="{StaticResource MainWindow.Background}" d:DataContext="{d:DesignInstance Type=vm:EventDetailsViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}"> + Height="500" Width="800" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:EventDetailsViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource MainWindow.Foreground}"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml index 6a8b7c9b0..62c38a1e6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml @@ -42,25 +42,25 @@ Machine Version - + Organization - + Default RML - + Loaded RML - + Default Color Space - + Default Segment Length Default Spool Type - + OS Key diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml index f6c39a6cd..b04720647 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml @@ -9,7 +9,7 @@ xmlns:providers="clr-namespace:Tango.MachineStudio.MachineDesigner.AutoComplete" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views" - mc:Ignorable="d" Width="530" Height="239" Background="White"> + mc:Ignorable="d" Width="530" Height="239" Background="{StaticResource Dialog.Background}" Foreground="{StaticResource Dialog.Foreground}"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml index 0bf472a2e..70c9cb3c4 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -6,7 +6,8 @@ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:sys="clr-namespace:System;assembly=mscorlib" - xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources"> + xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"> @@ -55,31 +56,10 @@ + - - - - - - - - ../Fonts/#digital-7 @@ -90,6 +70,15 @@ + + + + + 4 + 8 + 16 + True + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml index ad8f0f09b..8dd4efc32 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/DarkThemeColors.xaml @@ -146,7 +146,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml index 25f72f8d4..0f5727e5b 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/LightThemeColors.xaml @@ -124,6 +124,7 @@ +