diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-08-11 16:48:35 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-08-11 16:48:35 +0300 |
| commit | d045a47ad7363e62b763013fa6afcdb1762a7ce3 (patch) | |
| tree | 8a3e07bd4faf7ad4dc70a3962e9d2ac7cd5a5677 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views | |
| parent | 230ea9b597a2932f5d16572d94ee14c862d5b419 (diff) | |
| download | Tango-d045a47ad7363e62b763013fa6afcdb1762a7ce3.tar.gz Tango-d045a47ad7363e62b763013fa6afcdb1762a7ce3.zip | |
Machine Studio : added configuration for dark /light theme
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views')
3 files changed, 62 insertions, 48 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index b90aa62b8..54a3b72a9 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -85,7 +85,7 @@ </ObjectDataProvider> - <SolidColorBrush x:Key="SideBarBackground" Color="White"> + <SolidColorBrush x:Key="SideBarBackground" Color="{Binding Path=Color, Source={StaticResource SideBarBackgroundBrush}}"> </SolidColorBrush> @@ -188,7 +188,7 @@ <Setter Property="BorderThickness" Value="1"></Setter> <Setter Property="ToolTip"> <Setter.Value> - <ToolTip Background="White"> + <ToolTip Background="{StaticResource MainWindow.Background}" Foreground="{StaticResource MainWindow.Foreground}"> <ItemsControl ItemsSource="{Binding Coordinates.OutputLiquids}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> @@ -519,24 +519,13 @@ <Polygon.Style> <Style TargetType="Polygon"> <Setter Property="Stroke" Value="{StaticResource BlackForegroundBrush}"></Setter> - <Setter Property="Fill"> - <Setter.Value> - <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> - <GradientStop Color="#00EEEEEE" Offset="0" /> - <GradientStop Color="#FFB5B5B5" Offset="1" /> - </LinearGradientBrush> - </Setter.Value> + <Setter Property="Fill" Value="{StaticResource SegmentGradientBrush}"> </Setter> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,FallbackValue=False}" Value="True"> <Setter Property="Stroke" Value="{StaticResource BlackForegroundBrush}"></Setter> - <Setter Property="Fill"> - <Setter.Value> - <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> - <GradientStop Color="White" Offset="0" /> - <GradientStop Color="{StaticResource AccentColor}" Offset="2" /> - </LinearGradientBrush> - </Setter.Value> + <Setter Property="Fill" Value="{StaticResource SelectedSegmentGradientBrush}"> + </Setter> </DataTrigger> </Style.Triggers> @@ -558,12 +547,12 @@ </Grid.ColumnDefinitions> <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> - <TextBlock FontWeight="SemiBold">#</TextBlock> - <TextBlock FontWeight="SemiBold" Margin="5 0 0 0" Text="{Binding SegmentIndex}"></TextBlock> + <TextBlock FontWeight="SemiBold" Foreground="{StaticResource DarkGrayBrush}">#</TextBlock> + <TextBlock FontWeight="SemiBold" Margin="5 0 0 0" Text="{Binding SegmentIndex}" Foreground="{StaticResource DarkGrayBrush}"></TextBlock> </StackPanel> - <TextBox Grid.Column="1" CaretBrush="Transparent" Cursor="Arrow" VerticalAlignment="Center" Width="200" HorizontalContentAlignment="Center" Style="{x:Null}" BorderThickness="0" Background="Transparent" Text="{Binding Name}"></TextBox> + <TextBox Grid.Column="1" CaretBrush="Transparent" Cursor="Arrow" VerticalAlignment="Center" Width="200" HorizontalContentAlignment="Center" Style="{x:Null}" BorderThickness="0" Background="Transparent" Text="{Binding Name}" Foreground="{StaticResource DarkGrayBrush}"></TextBox> </Grid> </Grid> @@ -575,16 +564,16 @@ <Rectangle HorizontalAlignment="Right" StrokeThickness="1" Width="3" Margin="0 0 0 0"> <Rectangle.Fill> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> - <GradientStop Offset="0" Color="#ECECEC" /> - <GradientStop Offset="0.5" Color="Black" /> - <GradientStop Offset="1.1" Color="Black" /> + <GradientStop Offset="0" Color="{Binding Source={StaticResource WhiteBrush100}, Path=Color}" /> + <GradientStop Offset="0.5" Color="{Binding Source={StaticResource BlackForegroundBrush}, Path=Color}" /> + <GradientStop Offset="1.1" Color="{Binding Source={StaticResource BlackForegroundBrush}, Path=Color}" /> </LinearGradientBrush> </Rectangle.Fill> <Rectangle.Stroke> <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> - <GradientStop Offset="0" Color="White" /> - <GradientStop Offset="0.5" Color="White" /> - <GradientStop Offset="1" Color="White" /> + <GradientStop Offset="0" Color="{Binding Source={StaticResource BorderBrushGainsboro}, Path=Color}" /> + <GradientStop Offset="0.5" Color="{Binding Source={StaticResource BorderBrushGainsboro}, Path=Color}" /> + <GradientStop Offset="1" Color="{Binding Source={StaticResource BorderBrushGainsboro}, Path=Color}" /> </LinearGradientBrush> </Rectangle.Stroke> </Rectangle> @@ -595,7 +584,12 @@ <RowDefinition Height="Auto" /> <RowDefinition/> </Grid.RowDefinitions> - + <Grid.Resources> + <Style TargetType="TextBlock"> + <Setter Property="Foreground" + Value="{StaticResource JobFieldForeground}" /> + </Style> + </Grid.Resources> <Grid> <StackPanel> <Grid> @@ -617,7 +611,7 @@ <Image Source="../Images/name.png" Width="32"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Name</TextBlock> </StackPanel> - <TextBox Margin="0 3 0 0" Width="100" HorizontalAlignment="Left" Text="{Binding ActiveJob.Name,UpdateSourceTrigger=PropertyChanged}"></TextBox> + <TextBox Margin="0 3 0 0" Width="100" HorizontalAlignment="Left" Text="{Binding ActiveJob.Name,UpdateSourceTrigger=PropertyChanged}" Foreground="{StaticResource JobFieldForeground}"></TextBox> </StackPanel> </Border> @@ -649,8 +643,8 @@ <DataTemplate> <TextBlock TextTrimming="CharacterEllipsis"> <Run Text="{Binding Name}"></Run> - <Run FontSize="9" Foreground="Gray" Text="{Binding Length,Mode=OneWay}"></Run> - <Run FontSize="9" Foreground="Gray" Text="m"></Run> + <Run FontSize="9" Foreground="{StaticResource GrayBrush}" Text="{Binding Length,Mode=OneWay}"></Run> + <Run FontSize="9" Foreground="{StaticResource GrayBrush}" Text="m"></Run> </TextBlock> </DataTemplate> </ComboBox.ItemTemplate> @@ -700,7 +694,7 @@ <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Description</TextBlock> </StackPanel> - <Border BorderThickness="0" BorderBrush="Silver" CornerRadius="5" Margin="0 0 5 5"> + <Border BorderThickness="0" BorderBrush="{StaticResource borderBrush}" CornerRadius="5" Margin="0 0 5 5"> <TextBox Padding="5 0 0 0" FontStyle="Italic" Background="Transparent" Style="{x:Null}" BorderThickness="0" Margin="5" Height="40" Text="{Binding ActiveJob.Description}" VerticalAlignment="Stretch" materialDesign:HintAssist.Hint="Enter description" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"></TextBox> </Border> </StackPanel> @@ -818,7 +812,7 @@ </shapes:Hexagon.Fill> </shapes:Hexagon> - <TextBox Style="{x:Null}" Background="Transparent" Foreground="{StaticResource BlackForegroundBrush}" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" FontStyle="Italic"></TextBox> + <TextBox Style="{x:Null}" Background="Transparent" Foreground="{StaticResource Hexagon.ForegroundBrush}" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" FontStyle="Italic"></TextBox> </Grid> </StackPanel> </DataTemplate> @@ -835,7 +829,7 @@ <Button Command="{Binding SaveLiquidFactorsCommand}" HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" IsEnabled="{Binding AuthenticationProvider.CurrentUser,Converter={StaticResource UserRoleToBooleanConverter},ConverterParameter='Researcher'}"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon VerticalAlignment="Center" Kind="Harddisk"></materialDesign:PackIcon> - <TextBlock Margin="10 0 0 0">SAVE FACTORS</TextBlock> + <TextBlock Margin="10 0 0 0" Foreground="{StaticResource CheckmarkFill}">SAVE FACTORS</TextBlock> </StackPanel> </Button> </StackPanel> @@ -850,19 +844,19 @@ <Button Command="{Binding DuplicateBrushStopCommand}" Margin="0 0 4 0" Background="{StaticResource OrangeBrush300}" BorderBrush="{StaticResource OrangeBrush300}" Height="42" Padding="10"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="ContentCopy" Width="24" Height="24"></materialDesign:PackIcon> - <TextBlock VerticalAlignment="Center">Duplicate</TextBlock> + <TextBlock VerticalAlignment="Center" Foreground="{StaticResource AccentSelectedColorBrush}">Duplicate</TextBlock> </StackPanel> </Button> <Button Command="{Binding RemoveBrushStopCommand}" Margin="0 0 4 0" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Height="42" Padding="10"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Delete" Width="24" Height="24"></materialDesign:PackIcon> - <TextBlock VerticalAlignment="Center">Remove</TextBlock> + <TextBlock VerticalAlignment="Center" Foreground="{StaticResource AccentSelectedColorBrush}">Remove</TextBlock> </StackPanel> </Button> <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddBrushStopButton}" Command="{Binding AddBrushStopCommand}" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Height="42" Padding="10"> <StackPanel Orientation="Horizontal"> <materialDesign:PackIcon Kind="Plus" Width="24" Height="24"></materialDesign:PackIcon> - <TextBlock VerticalAlignment="Center">New</TextBlock> + <TextBlock VerticalAlignment="Center" Foreground="{StaticResource AccentSelectedColorBrush}">New</TextBlock> </StackPanel> </Button> </StackPanel> @@ -896,6 +890,26 @@ </Grid> <Grid Margin="0 10 10 0"> <controls:MultiSelectListBox x:Name="listStops" AutomationProperties.AutomationId="{x:Static automation:Developer.BrushStopsListBox}" SelectionMode="Extended" Style="{x:Null}" Background="Transparent" ScrollViewer.CanContentScroll="False" BorderThickness="0" ItemsSource="{Binding BrushStopsCollectionView}" SelectedItem="{Binding SelectedBrushStop}" SelectedItemsList="{Binding SelectedBrushStops,Mode=TwoWay}" HorizontalContentAlignment="Stretch"> + <ListBox.Template> + <ControlTemplate TargetType="{x:Type ListBox}"> + <Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}" Padding="1"> + <Grid> + <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false"> + <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> + </ScrollViewer> + </Grid> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Background" TargetName="Bd" Value="Transparent" /> + </Trigger> + <Trigger Property="IsGrouping" Value="true"> + <Setter Property="ScrollViewer.CanContentScroll" Value="false" /> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </ListBox.Template> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem" BasedOn="{StaticResource basicListBoxItem}"> <EventSetter Event="PreviewMouseDown" Handler="OnBrushStopMouseDown"></EventSetter> @@ -908,8 +922,8 @@ <Border BorderThickness="1" CornerRadius="5" Padding="10" dragAndDrop:DragAndDropService.Drop="OnBrushStopBorderDrop"> <Border.Style> <Style TargetType="Border" BasedOn="{StaticResource brushStopBorder}"> - <Setter Property="BorderBrush" Value="#B5B5B5"></Setter> - <Setter Property="Background" Value="#70FFFFFF"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource LightGrayBrush100}"></Setter> + <Setter Property="Background" Value="{StaticResource TransparentBackgroundBrush600}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected,FallbackValue=False}" Value="True"> <Setter Property="BorderBrush" Value="Gainsboro"></Setter> @@ -1236,7 +1250,7 @@ <DockPanel> <Grid DockPanel.Dock="Left" VerticalAlignment="Center" Margin="20 15 0 0"> <TextBlock FontSize="16" Margin="0 0 0 0"> - <Run FontWeight="Bold">ESTIMATED DURATION:</Run> + <Run FontWeight="Bold" Foreground="{StaticResource BlackForegroundBrush}">ESTIMATED DURATION:</Run> <Run Foreground="{StaticResource BlackForegroundBrush}" FontSize="22" FontStyle="Italic" FontFamily="{StaticResource digital-7}" Text="{Binding EstimatedDuration,StringFormat=hh\\:mm\\:ss,TargetNullValue='00:00:00'}"></Run> </TextBlock> </Grid> @@ -1329,7 +1343,7 @@ </materialDesign:PackIcon> </StackPanel> - <Border BorderBrush="Gainsboro" BorderThickness="1" VerticalAlignment="Bottom" Height="20" Margin="40 0 50 0"> + <Border BorderBrush="{StaticResource BorderBrushGainsboro}" BorderThickness="1" VerticalAlignment="Bottom" Height="20" Margin="40 0 50 0"> </Border> </Grid> @@ -1427,7 +1441,7 @@ <Border Padding="5" CornerRadius="5" BorderThickness="1" Margin="5"> <Border.Style> <Style TargetType="Border"> - <Setter Property="BorderBrush" Value="Silver"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource borderBrush}"></Setter> <Setter Property="Opacity" Value="0.5"></Setter> <Setter Property="Background" Value="Transparent"></Setter> <Style.Triggers> @@ -1442,7 +1456,7 @@ <Grid> <StackPanel> <DockPanel> - <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox> + <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}" Foreground="{StaticResource MainWindow.Foreground}"></TextBox> <WrapPanel Orientation="Vertical" Margin="0 5 0 0"> <WrapPanel.Resources> <Style TargetType="TextBlock"> @@ -1465,7 +1479,7 @@ <Border> <Border.Style> <Style TargetType="Border"> - <Setter Property="BorderBrush" Value="Gainsboro"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource BorderBrushGainsboro}"></Setter> <Setter Property="BorderThickness" Value="1"></Setter> <Setter Property="Padding" Value="2"></Setter> <Setter Property="Margin" Value="4"></Setter> @@ -1495,8 +1509,8 @@ <Grid Background="Transparent" Style="{StaticResource draggableDroppableGrid}" dragAndDrop:DragAndDropService.Drop="OnProcessParameterDropped" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=editors:ParameterizedEditor},Path=DraggingSurface}"> <ContentControl> <StackPanel> - <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11"></TextBlock> - <mahapps:NumericUpDown FontSize="20" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Center" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown> + <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11" Foreground="{StaticResource MainWindow.Foreground}"></TextBlock> + <mahapps:NumericUpDown FontSize="20" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Center" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}" Foreground="{StaticResource MainWindow.Foreground}"></mahapps:NumericUpDown> </StackPanel> </ContentControl> </Grid> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index 2787d73ef..08ba5b699 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -43,7 +43,7 @@ <converters:MathOperatorConverter x:Key="MathOperatorConverter" /> - <SolidColorBrush x:Key="SideBarBackground" Color="White"> + <SolidColorBrush x:Key="SideBarBackground" Color="{Binding Path=Color, Source={StaticResource SideBarBackgroundBrush}}"> </SolidColorBrush> @@ -65,7 +65,7 @@ </Grid.RowDefinitions> <StackPanel> - <Grid Background="{StaticResource DarkGrayBrush}" TextElement.Foreground="Silver"> + <Grid Background="#1B1B1B" TextElement.Foreground="Silver"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="LayoutTransform"> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml index 3073d0b62..e7f16146b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml @@ -220,7 +220,7 @@ <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> - <Border BorderBrush="Gray" BorderThickness="1 0 0 0" Background="White"> + <Border BorderBrush="Gray" BorderThickness="1 0 0 0" Background="{StaticResource WhiteBrush}"> <Grid> <ScrollViewer Padding="20" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"> <controls:JobOutlineControl HorizontalAlignment="Left" DataContext="{Binding JobHandler.JobTicket}" VirtualizingStackPanel.IsVirtualizing="True"/> @@ -237,7 +237,7 @@ </ContentControl> - <Border VerticalAlignment="Center" HorizontalAlignment="Left" Background="White" Width="30" Height="120" CornerRadius="10 0 0 10" Margin="-28 0 0 0" BorderBrush="Gray" BorderThickness="1 1 0 1"> + <Border VerticalAlignment="Center" HorizontalAlignment="Left" Background="{StaticResource WhiteBrush}" Width="30" Height="120" CornerRadius="10 0 0 10" Margin="-28 0 0 0" BorderBrush="Gray" BorderThickness="1 1 0 1"> <ToggleButton x:Name="toggleOutline" BorderThickness="0" Cursor="Hand" Background="Transparent"> <ToggleButton.Style> <Style TargetType="ToggleButton"> |
