<commit_before>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
                    xmlns:converters="http://metro.mahapps.com/winfx/xaml/shared"
                    xmlns:converter="clr-namespace:Toxy.Converter">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.ContextMenu.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.ListBox.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Tooltip.xaml" />
    </ResourceDictionary.MergedDictionaries>
    
    <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    <converters:ToUpperConverter x:Key="ToUpperConverter" />
    <converter:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
    <converter:BoolToVisibilityConverter x:Key="TrueToVisibilityConverter" />
    <converter:BoolToVisibilityConverter x:Key="FalseToVisibilityConverter"
                                         TrueValue="Collapsed"
                                         FalseValue="Visible" />
    <converter:ToxUserStatusToBrushConverter x:Key="ToxUserStatusToBrushConverter" />

    <DataTemplate x:Key="WindowTitleDataTemplate">
        <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, Converter={StaticResource ToUpperConverter}}"
                   TextTrimming="CharacterEllipsis"
                   VerticalAlignment="Center"
                   Margin="8 -1 0 0"
                   FontSize="{DynamicResource WindowTitleFontSize}"
                   FontFamily="{DynamicResource DefaultFont}" />
    </DataTemplate>

    <Style x:Key="ButtonRectangleStyle"
           TargetType="Rectangle">
        <Setter Property="VerticalAlignment"
                Value="Center"></Setter>
        <Setter Property="Fill"
                Value="{DynamicResource AccentColorBrush}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}"
                         Value="True">
                <DataTrigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Opacity)"
                                            To="0"
                                            Duration="0:0:0.15"/>
                        </Storyboard>
                    </BeginStoryboard>
                </DataTrigger.EnterActions>
                <DataTrigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Opacity)"
                                            To="1"
                                            Duration="0:0:0.15"/>
                        </Storyboard>
                    </BeginStoryboard>
                </DataTrigger.ExitActions>
            </DataTrigger>

        </Style.Triggers>
    </Style>

    <Style x:Key="ToxyMetroListBoxItem"
           TargetType="{x:Type ListBoxItem}"
           BasedOn="{StaticResource MetroListBoxItem}">
        <Setter Property="Background"
                Value="{DynamicResource WhiteBrush}" />
    </Style>
    <Style TargetType="ListBoxItem"
           BasedOn="{StaticResource ToxyMetroListBoxItem}" />

    <Style x:Key="MetroCircleLovelyButtonStyle"
           TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource MetroCircleButtonFocusVisual}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="BorderThickness"
                Value="2" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource AccentColorBrush4}" />
        <Setter Property="HorizontalContentAlignment"
                Value="Center" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Padding"
                Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Ellipse Fill="{TemplateBinding Background}"
                                 Margin="4"
                                 StrokeThickness="0" />
                        <Ellipse x:Name="ellipsebg"
                                 Fill="{DynamicResource AccentColorBrush2}"
                                 Opacity="0"
                                 Margin="4"
                                 StrokeThickness="0" />
                        <Ellipse x:Name="ellipse"
                                 Margin="4"
                                 Stroke="{TemplateBinding BorderBrush}"
                                 StrokeThickness="{Binding RelativeSource={x:Static RelativeSource.TemplatedParent}, Path=BorderThickness.Left}" />
                        <ContentPresenter x:Name="content"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Margin="{TemplateBinding Padding}"
                                          RecognizesAccessKey="True"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Button.IsMouseOver"
                                 Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="ellipsebg"
                                                         Storyboard.TargetProperty="Opacity"
                                                         From="0"
                                                         To="1"
                                                         Duration="0:0:0.3" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <!-- some out fading -->
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="ellipsebg"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="0"
                                                         Duration="0:0:0.3" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource GrayBrush7}" />
                            <Setter TargetName="ellipse"
                                    Property="Opacity"
                                    Value="0.3" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="RepeatButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid>
                        <ContentPresenter></ContentPresenter>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarThumbVertical"
           TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle"
                Value="true" />
        <Setter Property="IsTabStop"
                Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Rectangle x:Name="rectangle"
                               Fill="#8A8A8A"
                               Height="{TemplateBinding Height}"
                               SnapsToDevicePixels="True"
                               Width="{TemplateBinding Width}" />
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Fill"
                                    TargetName="rectangle"
                                    Value="#A6A6A6" />
                        </Trigger>
                        <Trigger Property="IsDragging"
                                 Value="true">
                            <Setter Property="Fill"
                                    TargetName="rectangle"
                                    Value="Black" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarStyle"
           TargetType="{x:Type ScrollBar}">
        <Setter Property="Stylus.IsPressAndHoldEnabled"
                Value="false" />
        <Setter Property="Stylus.IsFlicksEnabled"
                Value="false" />
        <Setter Property="BorderThickness"
                Value="1,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Grid x:Name="Bg"
                          Width="6"
                          Margin="6,1,0,1"
                          Background="Transparent"
                          SnapsToDevicePixels="true">
                        <Grid.RowDefinitions>
                            <RowDefinition  MaxHeight="0" />
                            <RowDefinition Height="0.00001*" />
                            <RowDefinition Height="0" />
                        </Grid.RowDefinitions>
                        <Border BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="0"
                                Background="Transparent"
                                Grid.Row="1" />
                        <RepeatButton Height="0"
                                      Width="0"
                                      x:Name="PART_LineUpButton"
                                      Command="{x:Static ScrollBar.LineUpCommand}"
                                      IsEnabled="{TemplateBinding IsMouseOver}" />
                        <Track x:Name="PART_Track"
                               IsDirectionReversed="true"
                               IsEnabled="{TemplateBinding IsMouseOver}"
                               Grid.Row="1">
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}"
                                              Background="Transparent"
                                              BorderBrush="Transparent"
                                              BorderThickness="0" />
                            </Track.DecreaseRepeatButton>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}"
                                              Background="Transparent"
                                              BorderBrush="Transparent"
                                              BorderThickness="0" />
                            </Track.IncreaseRepeatButton>
                            <Track.Thumb>
                                <Thumb Style="{StaticResource ScrollBarThumbVertical}" />
                            </Track.Thumb>
                        </Track>
                        <RepeatButton x:Name="PART_LineDownButton"
                                      Height="0"
                                      Width="0"
                                      Command="{x:Static ScrollBar.LineDownCommand}"
                                      IsEnabled="{TemplateBinding IsMouseOver}"
                                      Grid.Row="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ScrollViewer}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate  TargetType="{x:Type ScrollViewer}">
                    <Grid x:Name="Grid"
                          HorizontalAlignment="Stretch">
                        <ScrollContentPresenter   x:Name="PART_ScrollContentPresenter"
                                                  CanContentScroll="{TemplateBinding CanContentScroll}"
                                                  CanHorizontallyScroll="False"
                                                  CanVerticallyScroll="False"
                                                  ContentTemplate="{TemplateBinding ContentTemplate}"
                                                  Content="{TemplateBinding Content}"
                                                  Margin="{TemplateBinding Padding}" />
                        <ScrollBar x:Name="PART_VerticalScrollBar"
                                   HorizontalAlignment="Right"
                                   AutomationProperties.AutomationId="VerticalScrollBar"
                                   Cursor="Arrow"
                                   Maximum="{TemplateBinding ScrollableHeight}"
                                   Minimum="0"
                                   Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                   Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                                   Style="{StaticResource ScrollBarStyle}"
                                   ViewportSize="{TemplateBinding ViewportHeight}">
                        </ScrollBar>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Setter Property="VerticalScrollBarVisibility"
                                    Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="False">
                            <Setter Property="VerticalScrollBarVisibility"
                                    Value="Hidden" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- own menu style -->
    <Style TargetType="MenuItem"
           BasedOn="{StaticResource MetroMenuItem}">
        <Setter Property="RenderOptions.ClearTypeHint"
                Value="Enabled" />
        <Setter Property="TextOptions.TextRenderingMode"
                Value="ClearType" />
        <Setter Property="TextOptions.TextFormattingMode"
                Value="Display" />
    </Style>

    <!-- own tooltip style -->
    <Style TargetType="ToolTip"
           BasedOn="{StaticResource MetroToolTip}">
        <Setter Property="Padding"
                Value="3,2,3,2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Border x:Name="Root"
                            RenderOptions.ClearTypeHint="Enabled"
                            TextOptions.TextRenderingMode="ClearType"
                            TextOptions.TextFormattingMode="Display"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            Padding="{TemplateBinding Padding}"
                            Opacity="0">
                        <Border.Resources>
                            <Storyboard x:Key="Visible State" />
                            <Storyboard x:Key="Normal State" />
                        </Border.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="OpenStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Open"
                                                      GeneratedDuration="0:0:0.3"
                                                      To="Closed" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Closed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Root">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.4"
                                                                  Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Open">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Root">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter TextElement.Foreground="{TemplateBinding Foreground}"
                                          TextElement.FontSize="{DynamicResource ContentFontSize}"
                                          Cursor="{TemplateBinding Cursor}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          Content="{TemplateBinding Content}"
                                          Margin="{TemplateBinding Padding}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
<commit_msg>Adjusted image rendering behavior<commit_after>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
                    xmlns:converters="http://metro.mahapps.com/winfx/xaml/shared"
                    xmlns:converter="clr-namespace:Toxy.Converter">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.ContextMenu.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.ListBox.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.Tooltip.xaml" />
    </ResourceDictionary.MergedDictionaries>
    
    <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    <converters:ToUpperConverter x:Key="ToUpperConverter" />
    <converter:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
    <converter:BoolToVisibilityConverter x:Key="TrueToVisibilityConverter" />
    <converter:BoolToVisibilityConverter x:Key="FalseToVisibilityConverter"
                                         TrueValue="Collapsed"
                                         FalseValue="Visible" />
    <converter:ToxUserStatusToBrushConverter x:Key="ToxUserStatusToBrushConverter" />

    <DataTemplate x:Key="WindowTitleDataTemplate">
        <TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, Converter={StaticResource ToUpperConverter}}"
                   TextTrimming="CharacterEllipsis"
                   VerticalAlignment="Center"
                   Margin="8 -1 0 0"
                   FontSize="{DynamicResource WindowTitleFontSize}"
                   FontFamily="{DynamicResource DefaultFont}" />
    </DataTemplate>

    <Style TargetType="Image">
        <Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality" />
    </Style>

    <Style x:Key="ButtonRectangleStyle"
           TargetType="Rectangle">
        <Setter Property="VerticalAlignment"
                Value="Center"></Setter>
        <Setter Property="Fill"
                Value="{DynamicResource AccentColorBrush}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}"
                         Value="True">
                <DataTrigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Opacity)"
                                            To="0"
                                            Duration="0:0:0.15"/>
                        </Storyboard>
                    </BeginStoryboard>
                </DataTrigger.EnterActions>
                <DataTrigger.ExitActions>
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Opacity)"
                                            To="1"
                                            Duration="0:0:0.15"/>
                        </Storyboard>
                    </BeginStoryboard>
                </DataTrigger.ExitActions>
            </DataTrigger>

        </Style.Triggers>
    </Style>

    <Style x:Key="ToxyMetroListBoxItem"
           TargetType="{x:Type ListBoxItem}"
           BasedOn="{StaticResource MetroListBoxItem}">
        <Setter Property="Background"
                Value="{DynamicResource WhiteBrush}" />
    </Style>
    <Style TargetType="ListBoxItem"
           BasedOn="{StaticResource ToxyMetroListBoxItem}" />

    <Style x:Key="MetroCircleLovelyButtonStyle"
           TargetType="{x:Type Button}">
        <Setter Property="FocusVisualStyle"
                Value="{StaticResource MetroCircleButtonFocusVisual}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="BorderThickness"
                Value="2" />
        <Setter Property="BorderBrush"
                Value="{DynamicResource AccentColorBrush4}" />
        <Setter Property="HorizontalContentAlignment"
                Value="Center" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Padding"
                Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Ellipse Fill="{TemplateBinding Background}"
                                 Margin="4"
                                 StrokeThickness="0" />
                        <Ellipse x:Name="ellipsebg"
                                 Fill="{DynamicResource AccentColorBrush2}"
                                 Opacity="0"
                                 Margin="4"
                                 StrokeThickness="0" />
                        <Ellipse x:Name="ellipse"
                                 Margin="4"
                                 Stroke="{TemplateBinding BorderBrush}"
                                 StrokeThickness="{Binding RelativeSource={x:Static RelativeSource.TemplatedParent}, Path=BorderThickness.Left}" />
                        <ContentPresenter x:Name="content"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Margin="{TemplateBinding Padding}"
                                          RecognizesAccessKey="True"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Button.IsMouseOver"
                                 Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="ellipsebg"
                                                         Storyboard.TargetProperty="Opacity"
                                                         From="0"
                                                         To="1"
                                                         Duration="0:0:0.3" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <!-- some out fading -->
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="ellipsebg"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="0"
                                                         Duration="0:0:0.3" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsEnabled"
                                 Value="false">
                            <Setter Property="Foreground"
                                    Value="{DynamicResource GrayBrush7}" />
                            <Setter TargetName="ellipse"
                                    Property="Opacity"
                                    Value="0.3" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="RepeatButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Grid>
                        <ContentPresenter></ContentPresenter>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarThumbVertical"
           TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle"
                Value="true" />
        <Setter Property="IsTabStop"
                Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Rectangle x:Name="rectangle"
                               Fill="#8A8A8A"
                               Height="{TemplateBinding Height}"
                               SnapsToDevicePixels="True"
                               Width="{TemplateBinding Width}" />
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="true">
                            <Setter Property="Fill"
                                    TargetName="rectangle"
                                    Value="#A6A6A6" />
                        </Trigger>
                        <Trigger Property="IsDragging"
                                 Value="true">
                            <Setter Property="Fill"
                                    TargetName="rectangle"
                                    Value="Black" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarStyle"
           TargetType="{x:Type ScrollBar}">
        <Setter Property="Stylus.IsPressAndHoldEnabled"
                Value="false" />
        <Setter Property="Stylus.IsFlicksEnabled"
                Value="false" />
        <Setter Property="BorderThickness"
                Value="1,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Grid x:Name="Bg"
                          Width="6"
                          Margin="6,1,0,1"
                          Background="Transparent"
                          SnapsToDevicePixels="true">
                        <Grid.RowDefinitions>
                            <RowDefinition  MaxHeight="0" />
                            <RowDefinition Height="0.00001*" />
                            <RowDefinition Height="0" />
                        </Grid.RowDefinitions>
                        <Border BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="0"
                                Background="Transparent"
                                Grid.Row="1" />
                        <RepeatButton Height="0"
                                      Width="0"
                                      x:Name="PART_LineUpButton"
                                      Command="{x:Static ScrollBar.LineUpCommand}"
                                      IsEnabled="{TemplateBinding IsMouseOver}" />
                        <Track x:Name="PART_Track"
                               IsDirectionReversed="true"
                               IsEnabled="{TemplateBinding IsMouseOver}"
                               Grid.Row="1">
                            <Track.DecreaseRepeatButton>
                                <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}"
                                              Background="Transparent"
                                              BorderBrush="Transparent"
                                              BorderThickness="0" />
                            </Track.DecreaseRepeatButton>
                            <Track.IncreaseRepeatButton>
                                <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}"
                                              Background="Transparent"
                                              BorderBrush="Transparent"
                                              BorderThickness="0" />
                            </Track.IncreaseRepeatButton>
                            <Track.Thumb>
                                <Thumb Style="{StaticResource ScrollBarThumbVertical}" />
                            </Track.Thumb>
                        </Track>
                        <RepeatButton x:Name="PART_LineDownButton"
                                      Height="0"
                                      Width="0"
                                      Command="{x:Static ScrollBar.LineDownCommand}"
                                      IsEnabled="{TemplateBinding IsMouseOver}"
                                      Grid.Row="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ScrollViewer}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate  TargetType="{x:Type ScrollViewer}">
                    <Grid x:Name="Grid"
                          HorizontalAlignment="Stretch">
                        <ScrollContentPresenter   x:Name="PART_ScrollContentPresenter"
                                                  CanContentScroll="{TemplateBinding CanContentScroll}"
                                                  CanHorizontallyScroll="False"
                                                  CanVerticallyScroll="False"
                                                  ContentTemplate="{TemplateBinding ContentTemplate}"
                                                  Content="{TemplateBinding Content}"
                                                  Margin="{TemplateBinding Padding}" />
                        <ScrollBar x:Name="PART_VerticalScrollBar"
                                   HorizontalAlignment="Right"
                                   AutomationProperties.AutomationId="VerticalScrollBar"
                                   Cursor="Arrow"
                                   Maximum="{TemplateBinding ScrollableHeight}"
                                   Minimum="0"
                                   Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                   Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                                   Style="{StaticResource ScrollBarStyle}"
                                   ViewportSize="{TemplateBinding ViewportHeight}">
                        </ScrollBar>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver"
                                 Value="True">
                            <Setter Property="VerticalScrollBarVisibility"
                                    Value="Visible" />
                        </Trigger>
                        <Trigger Property="IsMouseOver"
                                 Value="False">
                            <Setter Property="VerticalScrollBarVisibility"
                                    Value="Hidden" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- own menu style -->
    <Style TargetType="MenuItem"
           BasedOn="{StaticResource MetroMenuItem}">
        <Setter Property="RenderOptions.ClearTypeHint"
                Value="Enabled" />
        <Setter Property="TextOptions.TextRenderingMode"
                Value="ClearType" />
        <Setter Property="TextOptions.TextFormattingMode"
                Value="Display" />
    </Style>

    <!-- own tooltip style -->
    <Style TargetType="ToolTip"
           BasedOn="{StaticResource MetroToolTip}">
        <Setter Property="Padding"
                Value="3,2,3,2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Border x:Name="Root"
                            RenderOptions.ClearTypeHint="Enabled"
                            TextOptions.TextRenderingMode="ClearType"
                            TextOptions.TextFormattingMode="Display"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            Padding="{TemplateBinding Padding}"
                            Opacity="0">
                        <Border.Resources>
                            <Storyboard x:Key="Visible State" />
                            <Storyboard x:Key="Normal State" />
                        </Border.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="OpenStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Open"
                                                      GeneratedDuration="0:0:0.3"
                                                      To="Closed" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Closed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Root">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.4"
                                                                  Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Open">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Root">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter TextElement.Foreground="{TemplateBinding Foreground}"
                                          TextElement.FontSize="{DynamicResource ContentFontSize}"
                                          Cursor="{TemplateBinding Cursor}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          Content="{TemplateBinding Content}"
                                          Margin="{TemplateBinding Padding}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>

{'fraction_non_alphanumeric': 0.08782435129740519, 'fraction_numerical': 0.005002652922004093, 'mean_word_length': 1.0519467053761211, 'pattern_counts': {'":': 0, '<': 436, '<?xml version=': 0, '>': 436, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 290, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3685938', 'n_tokens_mistral': 8346, 'n_tokens_neox': 7522, 'n_words': 1093}