<commit_before>﻿<src:OverlayWindow x:Class="GW2PAO.Modules.Tasks.Views.AddNewTaskDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:src="clr-namespace:GW2PAO.Views"
        xmlns:resx="clr-namespace:GW2PAO.Properties"
        xmlns:converters="clr-namespace:GW2PAO.Converters"
        xmlns:core="clr-namespace:GW2PAO.PresentationCore;assembly=GW2PAO.PresentationCore"
        xmlns:auto="clr-namespace:FeserWard.Controls;assembly=IntelliBox"
        Width="450"
        Height="288"
        WindowStyle="None" AllowsTransparency="true" Background="Transparent"
        ResizeMode="NoResize"
        Topmost="True"
        TextOptions.TextFormattingMode="Display" UseLayoutRounding="True"
        MouseLeftButtonDown="Window_MouseLeftButtonDown">

    <src:OverlayWindow.Resources>
        <converters:BoolToVisibleHiddenConverter x:Key="BoolToVisibility" />
        <DockPanel x:Key="RefreshGraphic">
            <Path HorizontalAlignment="Center" VerticalAlignment="Center"
                    Stretch="Uniform"
                    Stroke="{Binding Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Button}}"
                    StrokeStartLineCap="Round" StrokeEndLineCap="Round"
                    StrokeThickness="1"
                    Fill="{Binding Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Button}}"
                    Data="M 0,200   C 0,100 75,0 200,0   C 300,0 400,75 400,200  L 450,200  L 375,300  L 300,200  L 350,200  C 350,100 275,50 200,50  C 100,50 50,125 50,200 C 50,250 100,350 200,350  L 200,400  C 100,400 0,300 0,200">
            </Path>
        </DockPanel>
        <auto:IntelliboxAlternateRowColorizer x:Key="IntelliboxRowColorizer" EvenRowBrush="Black" OddRowBrush="Black" />
    </src:OverlayWindow.Resources>

    <Border BorderBrush="Black" BorderThickness="2" CornerRadius="3" Margin="10">
        <Border.Effect>
            <DropShadowEffect BlurRadius="10" Color="Black" Direction="315" Opacity="0.8"/>
        </Border.Effect>
        <Border.Background>
            <ImageBrush Viewbox="0,0,300,300" ViewboxUnits="Absolute" ImageSource="/Images/Backgrounds/Medium4.png" />
        </Border.Background>


        <Grid Margin="8">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <Grid Grid.Row="0"
                  Margin="5,0,0,0"
                  Grid.Column="0" Grid.ColumnSpan="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Border Grid.Column="0"
                        BorderBrush="Black" BorderThickness="1">
                    <Image Name="IconImage"
                           Height="30" Width="30"
                           MouseLeftButtonDown="Image_MouseLeftButtonDown">
                        <Image.Style>
                            <Style TargetType="Image">
                                <Setter Property="Source" Value="{Binding Task.IconUri}" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding Task.IconUri}" Value="{x:Null}">
                                        <Setter Property="Source" Value="/Images/Commerce/unknown_icon.png" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Image.Style>
                    </Image>
                    <Border.Style>
                        <Style TargetType="{x:Type Border}">
                            <Setter Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect ShadowDepth="0"
                                                      Color="White"
                                                      Opacity="0"
                                                      BlurRadius="5"/>
                                </Setter.Value>
                            </Setter>
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Trigger.EnterActions>
                                        <BeginStoryboard>
                                            <Storyboard>
                                                <DoubleAnimation To="1"
                                                                 Storyboard.TargetProperty="(Effect).Opacity"
                                                                 Duration="00:00:00.1"/>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.EnterActions>
                                    <Trigger.ExitActions>
                                        <BeginStoryboard>
                                            <Storyboard>
                                                <DoubleAnimation To="0"
                                                                 Storyboard.TargetProperty="(Effect).Opacity"
                                                                 Duration="00:00:0.1"/>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.ExitActions>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Border.Style>
                </Border>
                <Popup Name="IconPopup"
                       AllowsTransparency="True"
                       StaysOpen="False" PopupAnimation="Fade"
                       PlacementTarget="{Binding ElementName=IconImage}"
                       SnapsToDevicePixels="True" UseLayoutRounding="True"
                       HorizontalAlignment="Left"
                       Placement="Bottom" VerticalOffset="-30">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Rectangle Grid.Row="0"
                                   Height="{Binding ElementName=IconImage, Path=Height}"
                                   HorizontalAlignment="Stretch">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="#01000000" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Border Grid.Row="1"
                                BorderThickness="1"
                                Padding="5">
                            <Border.Background>
                                <SolidColorBrush Color="Black" Opacity="0.8" />
                            </Border.Background>
                            <Border.BorderBrush>
                                <SolidColorBrush Color="PaleGoldenrod" Opacity="0.25" />
                            </Border.BorderBrush>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <RadioButton Name="ItemIconRadioButton"
                                             Grid.Row="0" Grid.Column="0"
                                             Margin="5" IsChecked="True">
                                    <core:OutlinedTextBlock Text="{x:Static resx:Resources.ItemIcon}" />
                                </RadioButton>
                                <Grid Grid.Row="1" Grid.Column="0"
                                      Visibility="{Binding ElementName=ItemIconRadioButton, Path=IsChecked, Converter={StaticResource BoolToVisibility}}"
                                      Margin="5,0,5,0">
                                    <Grid.Resources>
                                        <Style x:Key="CustomListViewItems" TargetType="{x:Type ListViewItem}">
                                            <Setter Property="Background" Value="Transparent"/>
                                            <Setter Property="Foreground" Value="White"/>
                                            <EventSetter Event="MouseUp" Handler="OnIntelliboxSuggestItem_MouseUp" />
                                            <Setter Property="Template"><commit_msg>Tweaked style of icon selection pop-up<commit_after>﻿<src:OverlayWindow x:Class="GW2PAO.Modules.Tasks.Views.AddNewTaskDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:src="clr-namespace:GW2PAO.Views"
        xmlns:resx="clr-namespace:GW2PAO.Properties"
        xmlns:converters="clr-namespace:GW2PAO.Converters"
        xmlns:core="clr-namespace:GW2PAO.PresentationCore;assembly=GW2PAO.PresentationCore"
        xmlns:auto="clr-namespace:FeserWard.Controls;assembly=IntelliBox"
        Width="450"
        Height="288"
        WindowStyle="None" AllowsTransparency="true" Background="Transparent"
        ResizeMode="NoResize"
        Topmost="True"
        TextOptions.TextFormattingMode="Display" UseLayoutRounding="True"
        MouseLeftButtonDown="Window_MouseLeftButtonDown">

    <src:OverlayWindow.Resources>
        <converters:BoolToVisibleHiddenConverter x:Key="BoolToVisibility" />
        <DockPanel x:Key="RefreshGraphic">
            <Path HorizontalAlignment="Center" VerticalAlignment="Center"
                    Stretch="Uniform"
                    Stroke="{Binding Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Button}}"
                    StrokeStartLineCap="Round" StrokeEndLineCap="Round"
                    StrokeThickness="1"
                    Fill="{Binding Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Button}}"
                    Data="M 0,200   C 0,100 75,0 200,0   C 300,0 400,75 400,200  L 450,200  L 375,300  L 300,200  L 350,200  C 350,100 275,50 200,50  C 100,50 50,125 50,200 C 50,250 100,350 200,350  L 200,400  C 100,400 0,300 0,200">
            </Path>
        </DockPanel>
        <auto:IntelliboxAlternateRowColorizer x:Key="IntelliboxRowColorizer" EvenRowBrush="Black" OddRowBrush="Black" />
    </src:OverlayWindow.Resources>

    <Border BorderBrush="Black" BorderThickness="2" CornerRadius="3" Margin="10">
        <Border.Effect>
            <DropShadowEffect BlurRadius="10" Color="Black" Direction="315" Opacity="0.8"/>
        </Border.Effect>
        <Border.Background>
            <ImageBrush Viewbox="0,0,300,300" ViewboxUnits="Absolute" ImageSource="/Images/Backgrounds/Medium4.png" />
        </Border.Background>


        <Grid Margin="8">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <Grid Grid.Row="0"
                  Margin="5,0,0,0"
                  Grid.Column="0" Grid.ColumnSpan="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Border Grid.Column="0"
                        BorderBrush="Black" BorderThickness="1">
                    <Image Name="IconImage"
                           Height="30" Width="30"
                           MouseLeftButtonDown="Image_MouseLeftButtonDown">
                        <Image.Style>
                            <Style TargetType="Image">
                                <Setter Property="Source" Value="{Binding Task.IconUri}" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding Task.IconUri}" Value="{x:Null}">
                                        <Setter Property="Source" Value="/Images/Commerce/unknown_icon.png" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Image.Style>
                    </Image>
                    <Border.Style>
                        <Style TargetType="{x:Type Border}">
                            <Setter Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect ShadowDepth="0"
                                                      Color="White"
                                                      Opacity="0"
                                                      BlurRadius="5"/>
                                </Setter.Value>
                            </Setter>
                            <Style.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Trigger.EnterActions>
                                        <BeginStoryboard>
                                            <Storyboard>
                                                <DoubleAnimation To="1"
                                                                 Storyboard.TargetProperty="(Effect).Opacity"
                                                                 Duration="00:00:00.1"/>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.EnterActions>
                                    <Trigger.ExitActions>
                                        <BeginStoryboard>
                                            <Storyboard>
                                                <DoubleAnimation To="0"
                                                                 Storyboard.TargetProperty="(Effect).Opacity"
                                                                 Duration="00:00:0.1"/>
                                            </Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.ExitActions>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Border.Style>
                </Border>
                <Popup Name="IconPopup"
                       AllowsTransparency="True"
                       StaysOpen="False" PopupAnimation="Fade"
                       PlacementTarget="{Binding ElementName=IconImage}"
                       SnapsToDevicePixels="True" UseLayoutRounding="True"
                       HorizontalAlignment="Left"
                       Placement="Bottom" VerticalOffset="-30">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Rectangle Grid.Row="0"
                                   Height="{Binding ElementName=IconImage, Path=Height}"
                                   Width="{Binding ElementName=IconImage, Path=Width}"
                                   HorizontalAlignment="Left">
                            <Rectangle.Fill>
                                <SolidColorBrush Color="#01000000" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <Border Grid.Row="1"
                                BorderThickness="1"
                                Padding="5">
                            <Border.Background>
                                <SolidColorBrush Color="#FF473F31" Opacity="0.85" />
                            </Border.Background>
                            <Border.BorderBrush>
                                <SolidColorBrush Color="Black" Opacity="0.85" />
                            </Border.BorderBrush>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <RadioButton Name="ItemIconRadioButton"
                                             Grid.Row="0" Grid.Column="0"
                                             Margin="5" IsChecked="True">
                                    <core:OutlinedTextBlock Text="{x:Static resx:Resources.ItemIcon}" />
                                </RadioButton>
                                <Grid Grid.Row="1" Grid.Column="0"
                                      Visibility="{Binding ElementName=ItemIconRadioButton, Path=IsChecked, Converter={StaticResource BoolToVisibility}}"
                                      Margin="5,0,5,0">
                                    <Grid.Resources>
                                        <Style x:Key="CustomListViewItems" TargetType="{x:Type ListViewItem}">
                                            <Setter Property="Background" Value="Transparent"/>
                                            <Setter Property="Foreground" Value="White"/>
                                            <EventSetter Event="MouseUp" Handler="OnIntelliboxSuggestItem_MouseUp" />
                                            <Setter Property="Template">
{'fraction_non_alphanumeric': 0.09630411826821542, 'fraction_numerical': 0.02386483632523759, 'mean_word_length': 1.062166575939031, 'pattern_counts': {'":': 0, '<': 223, '<?xml version=': 0, '>': 223, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 125, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '246803', 'n_tokens_mistral': 4563, 'n_tokens_neox': 3924, 'n_words': 597}