<commit_before>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:WinHAB.Desktop.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="controls:IconLinkButton" BasedOn="{StaticResource SystemButtonBase}" >
        <Setter Property="Foreground" Value="{DynamicResource LinkButtonText}"/>
        <Setter Property="Width" Value="NaN" />
        <Setter Property="Height" Value="NaN" />
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:IconLinkButton}">
                    <Border Name="Chrome"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                SnapsToDevicePixels="true">
                        <Grid Margin="{TemplateBinding Padding}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Path Name="IconPath"  
                                  Data="{TemplateBinding IconData}"
                                  Width="{TemplateBinding IconSize}" Height="{TemplateBinding IconSize}" 
                                  Fill="{TemplateBinding Foreground}" Stretch="Uniform"/>
                            <TextBlock Name="LinkText"  Grid.Column="1"
                                       DataContext="{TemplateBinding Content}"
                                       Text="{Binding Converter={StaticResource ToUpperConverter}}"
                                       Margin="5,0,0,0"
                                       VerticalAlignment="Center"
                                       HorizontalAlignment="Left"
                                       SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Grid>

                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="LinkText" Property="Margin" Value="0"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource LinkButtonTextHover}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource LinkButtonTextPressed}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource LinkButtonTextDisabled}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="RightIconLinkButton" TargetType="controls:IconLinkButton" BasedOn="{StaticResource SystemButtonBase}" >
        <Setter Property="Foreground" Value="{DynamicResource WindowText}"/>
        <Setter Property="Width" Value="NaN" />
        <Setter Property="Height" Value="NaN" />
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:IconLinkButton}">
                    <Border Name="Chrome"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                SnapsToDevicePixels="true">
                        <Grid Margin="{TemplateBinding Padding}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Name="LinkText"  Grid.Column="0"
                                       DataContext="{TemplateBinding Content}"
                                       Text="{Binding Converter={StaticResource ToUpperConverter}}"
                                       Margin="0,0,5,0"
                                       VerticalAlignment="Center"
                                       HorizontalAlignment="Left"
                                       SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            <Path Name="IconPath" Grid.Column="1"  
                                  Data="{TemplateBinding IconData}"
                                  Width="{TemplateBinding IconSize}" Height="{TemplateBinding IconSize}" 
                                  Fill="{TemplateBinding Foreground}" Stretch="Uniform"/>
                        </Grid>

                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="LinkText" Property="Margin" Value="0"/>
                            <Setter TargetName="IconPath" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="IconData" Value="{x:Null}">
                            <Setter TargetName="LinkText" Property="Margin" Value="0"/>
                            <Setter TargetName="IconPath" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource Accent}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource LinkButtonTextPressed}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource LinkButtonTextDisabled}" />
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary><commit_msg>[Desktop.Themes] Fixed IconLinkButton style (internal TextBlock replaced with ContentPresenter). Removed RightIconLinkButton<commit_after>﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:WinHAB.Desktop.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="controls:IconLinkButton" BasedOn="{StaticResource SystemButtonBase}" >
        <Setter Property="Foreground" Value="{DynamicResource WindowText}"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Width" Value="NaN" />
        <Setter Property="Height" Value="NaN" />
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:IconLinkButton}">
                    <Border Name="Chrome"
                                Background="{TemplateBinding Background}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                SnapsToDevicePixels="true">
                        <Grid Margin="{TemplateBinding Padding}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Path Name="IconPath"  
                                  Data="{TemplateBinding IconData}"
                                  Width="{TemplateBinding IconSize}" Height="{TemplateBinding IconSize}" 
                                  Fill="{TemplateBinding Foreground}" Stretch="Uniform" />
                            <ContentPresenter Name="Presenter" Grid.Column="1" Margin="5,0,0,0"
                                          VerticalAlignment="Center"
                                          HorizontalAlignment="Left"
                                          RecognizesAccessKey="True"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Grid>

                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Content" Value="{x:Null}">
                            <Setter TargetName="Presenter" Property="Margin" Value="0"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Opacity" Value=".8"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Opacity" Value=".4" />
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>
{'fraction_non_alphanumeric': 0.10888825378679623, 'fraction_numerical': 0.003715347242069163, 'mean_word_length': 1.5730392156862745, 'pattern_counts': {'":': 0, '<': 136, '<?xml version=': 0, '>': 136, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 29, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '407871', 'n_tokens_mistral': 2446, 'n_tokens_neox': 2187, 'n_words': 377}