diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-04-07 16:14:48 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-04-07 16:14:48 +0300 |
| commit | 4a9fb8a89a7fc48d9d3ecc9f24770c472834453d (patch) | |
| tree | bec2580e005fb5e2089fcc88d92d6c3303c3d82f /Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes | |
| parent | f53099c8fddc7374857d29ee5521c00d91ec6d70 (diff) | |
| download | Tango-4a9fb8a89a7fc48d9d3ecc9f24770c472834453d.tar.gz Tango-4a9fb8a89a7fc48d9d3ecc9f24770c472834453d.zip | |
added code to launch dynamically dialogs during run time, correct styles treeview item
Diffstat (limited to 'Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes')
5 files changed, 153 insertions, 28 deletions
diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ButtonStyle.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ButtonStyle.xaml index 21ed3b4b8..f30adc85d 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ButtonStyle.xaml +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ButtonStyle.xaml @@ -31,7 +31,6 @@ <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource Button.MouseOver.Border}"/> </Trigger> <Trigger Property="IsMouseOver" Value="true"> - <Setter Property="Background" TargetName="border" Value="{DynamicResource Button.MouseOver.Background}"/> <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource Button.MouseOver.Border}"/> </Trigger> <Trigger Property="IsPressed" Value="true"> @@ -48,5 +47,35 @@ </Setter.Value> </Setter> </Style> - + <Style x:Key="TangoToolBarButtonStyle" TargetType="{x:Type Button}"> + <Setter Property="Width" Value="26"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type Button}"> + <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true"> + <Grid> + <Rectangle x:Name="background" Fill="Transparent" Opacity="1"/> + <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> + </Grid> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsDefaulted" Value="true"> + <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> + </Trigger> + <Trigger Property="IsMouseOver" Value="true"> + <Setter Property="Fill" TargetName="background" Value="{DynamicResource Toolbar.Button.MaouseMove.Background}"/> + </Trigger> + <Trigger Property="IsPressed" Value="true"> + <Setter Property="Fill" TargetName="background" Value="{DynamicResource ControlBrushColorKey}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Background" TargetName="border" Value="{DynamicResource Button.Disabled.Background}"/> + <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource Button.Disabled.Border}"/> + <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{DynamicResource Button.Disabled.Foreground}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> </ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/DarkThemesColors.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/DarkThemesColors.xaml index 011b26c0d..caab88ef1 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/DarkThemesColors.xaml +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/DarkThemesColors.xaml @@ -21,6 +21,7 @@ <SolidColorBrush x:Key="HighlightTextBrushKey" Color="#FFF0F0F0"/> <SolidColorBrush x:Key="ListBorder" Color="#FF3F3F46"/> <SolidColorBrush x:Key="Inactive.Selection" Color="#FF444444"/> + <SolidColorBrush x:Key="ContextMenu.MouseOverColor" Color="#FF333334"/> <SolidColorBrush x:Key="TabItem.Selected.Background" Color="#FF007ACC"/> @@ -93,5 +94,7 @@ <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FF252526"/> <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FF434346"/> <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF434346"/> + <SolidColorBrush x:Key="Toolbar.Button.MaouseMove.Background" Color="#FF3E3E40"/> + <SolidColorBrush x:Key="ToggleButton.Checked.Foreground" Color="#FF4E4E50"/> </ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/MenuDict.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/MenuDict.xaml index b2c3fd965..f51a50b50 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/MenuDict.xaml +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/MenuDict.xaml @@ -15,7 +15,7 @@ <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Menu}"> - <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> + <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </Border> </ControlTemplate> @@ -49,11 +49,15 @@ <!-- TopLevelHeader --> <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}"> <Grid x:Name="Border" Background="Transparent" Margin="0,2,0,2"> + <Rectangle x:Name="Bg" Fill="Transparent" /> <Rectangle x:Name="Inner_Border" Margin="4" Fill="Transparent"/> <ContentPresenter Margin="8,2,8,2" ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> - <Popup x:Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Fade"> - <Border x:Name="SubmenuBorder" BorderBrush="Transparent" BorderThickness="0" Background="{DynamicResource Menu.Background}" Padding="2"> + <Popup x:Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Fade" HorizontalOffset="2"> + <Border x:Name="SubmenuBorder" BorderBrush="{DynamicResource MenuItemHighlightedBackground}" BorderThickness="1" Background="{DynamicResource Menu.Background}" Padding="2" Margin="0,0,8,8"> + <Border.Effect> + <DropShadowEffect BlurRadius="6" Opacity="0.5" ShadowDepth="4" Direction="330"/> + </Border.Effect> <Grid RenderOptions.ClearTypeHint="Enabled" Background="Transparent"> <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Cycle" Grid.IsSharedSizeScope="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" KeyboardNavigation.TabNavigation="Cycle"/> </Grid> @@ -68,7 +72,7 @@ <Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> </Trigger> <Trigger SourceName="Popup" Property="AllowsTransparency" Value="True"> - <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0,0,4,4" /> + <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0,0,0,0" /> <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,0,0,3" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> @@ -120,7 +124,10 @@ <TextBlock Grid.Column="2" Margin="10,0,0,0" Text="{TemplateBinding InputGestureText}" VerticalAlignment="Center"/> <Path x:Name="RightArrow" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 0 7 L 4 3.5 Z" Fill="{DynamicResource Grip.Submenu.Background.Static}" Margin="8,0,0,0"/> <Popup x:Name="popup" PlacementTarget="{Binding ElementName=_grid}" Placement="Right" HorizontalOffset="0" AllowsTransparency="True" Focusable="False" PopupAnimation="Fade"> - <Border x:Name="SubmenuBorder" SnapsToDevicePixels="True" Background="{DynamicResource Menu.Submenu.Background}" BorderThickness="0" BorderBrush="#49a3e1"> + <Border x:Name="SubmenuBorder" SnapsToDevicePixels="True" Background="{DynamicResource Menu.Submenu.Background}" BorderThickness="1" BorderBrush="{DynamicResource MenuItemHighlightedBackground}" Margin="0,0,10,10"> + <Border.Effect> + <DropShadowEffect BlurRadius="6" Opacity="0.5" ShadowDepth="4" Direction="330" /> + </Border.Effect> <ItemsPresenter x:Name="_items" /> </Border> </Popup> @@ -134,6 +141,7 @@ <Setter Property="Fill" TargetName="Bg" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> <Setter Property="Fill" TargetName="Inner_Border" Value="{DynamicResource Menu.Submenu.MouseOverColor}"/> <Setter TargetName="RightArrow" Property="Fill" Value="{DynamicResource Grip.Submenu.Background.Selected}"/> + </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Foreground" Value="{DynamicResource Menu.Disable.Foreground}"/> @@ -181,4 +189,41 @@ </Setter.Value> </Setter> </Style> + + <Style TargetType="{x:Type ContextMenu}"> + <Setter Property="SnapsToDevicePixels" Value="True" /> + <Setter Property="OverridesDefaultStyle" Value="True" /> + <Setter Property="Grid.IsSharedSizeScope" Value="true" /> + <Setter Property="HasDropShadow" Value="True" /> + <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"></Setter> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ContextMenu}"> + <Border x:Name="Border" Background="{DynamicResource Background.Static}" BorderThickness="1" BorderBrush="{DynamicResource Inactive.Selection}"> + <Border.Effect> + <DropShadowEffect Color="Black" Direction="135" Opacity="0.8" ShadowDepth="2"/> + </Border.Effect> + <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsMouseOver" Value="true"> + <Setter TargetName="Border" Property="Background" Value="{DynamicResource Menu.Submenu.Background}" /> + <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ContextMenu.MouseOverColor}" /> + </Trigger> + <Trigger Property="HasDropShadow" Value="true"> + <Setter TargetName="Border" Property="Padding" Value="0,3,0,3" /> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + <Style.Resources> + <Style TargetType="{x:Type MenuItem}"> + <Setter Property="Background" Value="{DynamicResource Menu.Submenu.Background}"></Setter> + <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"></Setter> + <Setter Property="Margin" Value="1,0,1,0"></Setter> + </Style> + </Style.Resources> + </Style> + </ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml index 2cc24d31e..6223934b5 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/ToolbarStyle.xaml @@ -188,6 +188,38 @@ <Setter Property="Background" Value="{DynamicResource ControlBrushColorKey}"/> </DataTrigger> </Style.Triggers> + <Style.Resources> + <Style TargetType="{x:Type Button}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type Button}"> + <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true"> + <Grid> + <Rectangle x:Name="background" Fill="Transparent" Opacity="1"/> + <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> + </Grid> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsDefaulted" Value="true"> + <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/> + </Trigger> + <Trigger Property="IsMouseOver" Value="true"> + <Setter Property="Fill" TargetName="background" Value="{DynamicResource Toolbar.Button.MaouseMove.Background}"/> + </Trigger> + <Trigger Property="IsPressed" Value="true"> + <Setter Property="Fill" TargetName="background" Value="{DynamicResource ControlBrushColorKey}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Background" TargetName="border" Value="{DynamicResource Button.Disabled.Background}"/> + <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource Button.Disabled.Border}"/> + <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{DynamicResource Button.Disabled.Foreground}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + </Style.Resources> </Style> <Style x:Key="{x:Static ToolBar.SeparatorStyleKey}" TargetType="{x:Type Separator}"> diff --git a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/TreeViewItem.xaml b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/TreeViewItem.xaml index f37744004..4814368d0 100644 --- a/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/TreeViewItem.xaml +++ b/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/TreeViewItem.xaml @@ -1,6 +1,7 @@ <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="clr-namespace:Tango.Scripting.IDE.Themes"> + xmlns:local="clr-namespace:Tango.Scripting.IDE.Themes" + xmlns:conv="clr-namespace:Tango.Scripting.IDE.Converters"> <Style x:Key="TangoTreeViewStyle" TargetType="{x:Type TreeView}"> <Setter Property="Background" Value="{DynamicResource TreeBackgroundColor}"/> <Setter Property="BorderBrush" Value="{DynamicResource ListBorder}"/> @@ -104,22 +105,23 @@ <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TreeViewItem}"> - <Grid x:Name="GridTreeItem"> - <Grid.ColumnDefinitions> - <ColumnDefinition MinWidth="19" Width="Auto"/> - <ColumnDefinition Width="Auto"/> - <ColumnDefinition Width="*"/> - </Grid.ColumnDefinitions> - <Grid.RowDefinitions> - <RowDefinition Height="Auto"/> - <RowDefinition/> - </Grid.RowDefinitions> - <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/> - <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> - <ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> + <ControlTemplate.Resources> + <conv:LeftMarginMultiplierConverter Length="19" x:Key="lengthConverter" /> + </ControlTemplate.Resources> + <StackPanel> + <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> + <Grid x:Name="GridTreeItem" Margin="{Binding Converter={StaticResource lengthConverter}, + RelativeSource={RelativeSource TemplatedParent}}"> + <Grid.ColumnDefinitions> + <ColumnDefinition MinWidth="19" Width="Auto"/> + <ColumnDefinition Width="*"/> + </Grid.ColumnDefinitions> + <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/> + <ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> + </Grid> </Border> - <ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/> - </Grid> + <ItemsPresenter x:Name="ItemsHost"/> + </StackPanel> <ControlTemplate.Triggers> <Trigger Property="IsExpanded" Value="false"> <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/> @@ -127,8 +129,22 @@ <Trigger Property="HasItems" Value="false"> <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/> </Trigger> - <Trigger Property="IsSelected" Value="true"> - <Setter Property="Background" TargetName="GridTreeItem" Value="{DynamicResource ControlBrushColorKey}"/> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="HasHeader" Value="false"/> + <Condition Property="Width" Value="Auto"/> + </MultiTrigger.Conditions> + <Setter TargetName="PART_Header" Property="MinWidth" Value="75"/> + </MultiTrigger> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="HasHeader" Value="false"/> + <Condition Property="Height" Value="Auto"/> + </MultiTrigger.Conditions> + <Setter TargetName="PART_Header" Property="MinHeight" Value="19"/> + </MultiTrigger> + <Trigger Property="IsSelected" Value="true"> + <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ControlBrushColorKey}"/> <Setter Property="Foreground" Value="{DynamicResource HighlightTextBrushKey}"/> </Trigger> <MultiTrigger> @@ -136,11 +152,11 @@ <Condition Property="IsSelected" Value="true"/> <Condition Property="IsSelectionActive" Value="false"/> </MultiTrigger.Conditions> - <Setter Property="Background" TargetName="GridTreeItem" Value="{DynamicResource Inactive.Selection}"/> - <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"/> + <Setter Property="Background" TargetName="GridTreeItem" Value="{DynamicResource ControlBrushColorKey}"/> + <Setter Property="Foreground" Value="{DynamicResource HighlightTextBrushKey}"/> </MultiTrigger> <Trigger Property="IsEnabled" Value="false"> - <Setter Property="Foreground" Value="{DynamicResource ControlTextBrush}"/> + <Setter Property="Foreground" Value="{DynamicResource Inactive.Selection}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> |
