Skip to content

Commit 6bdb3a1

Browse files
Add git attributes file and fix file attributes (line endings, whitespaces, bomb, ...)
1 parent 70cb455 commit 6bdb3a1

37 files changed

+5133
-5061
lines changed

.gitattributes

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
* text=auto
2+
3+
# git
4+
.gitignore text
5+
6+
# source & misc files
7+
*.c text diff=cpp whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,no-newline-at-eof
8+
*.cpp text diff=cpp whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,no-newline-at-eof
9+
*.cs text diff=csharp whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
10+
*.h text diff=cpp whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,no-newline-at-eof
11+
*.hpp text diff=cpp whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,no-newline-at-eof
12+
*.html text diff=html whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
13+
*.java text diff=java whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
14+
*.js text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
15+
*.l text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
16+
*.m text diff=objc whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,no-newline-at-eof
17+
*.mm text diff=objc whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,no-newline-at-eof
18+
*.pl text diff=perl whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
19+
*.py text diff=python whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
20+
*.rb text diff=ruby whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
21+
*.tex text diff=text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
22+
*.txt text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
23+
*.xml text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
24+
*.y text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
25+
*.tsv text whitespace=-blank-at-eol,blank-at-eof,-space-before-tab,-tab-in-indent
26+
*.groovy text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
27+
28+
# Shell scripts
29+
*.sh diff=bash text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=lf executable=maybe
30+
_sh/* text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=lf executable=maybe
31+
*.bat text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf executable=maybe
32+
*.ps1 text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf executable=maybe
33+
34+
# Python scripts
35+
*.py text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=lf executable=maybe
36+
37+
# Awk scripts
38+
*.awk text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=lf
39+
40+
# GNU Makefile
41+
Makefile text whitespace=blank-at-eol,blank-at-eof,space-before-tab eol=lf
42+
43+
# CMake files
44+
CMakeLists.txt text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=lf
45+
*.cmake text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=lf
46+
47+
# Autotools
48+
*.am text whitespace=blank-at-eol,blank-at-eof,space-before-tab eol=lf
49+
50+
# Android
51+
*.mk text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=lf
52+
*.gradle text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent
53+
gradlew text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=lf executable
54+
gradlew.bat text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf executable=maybe
55+
56+
# Xcode files
57+
*.pbxproj text whitespace=blank-at-eol,blank-at-eof,space-before-tab eol=lf
58+
59+
# Visual Studio files
60+
*.sln text whitespace=blank-at-eol,blank-at-eof,space-before-tab eol=crlf bomb
61+
*.vcxproj text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf bomb
62+
*.vcxproj.filters text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf bomb
63+
*.csproj text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf bomb
64+
*.targets text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf bomb
65+
*.targets.template text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf bomb
66+
*.vsprops text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf bomb
67+
*.props text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf bomb
68+
*.xaml text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf bomb
69+
*.config text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent bomb=maybe
70+
*.resx text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf bomb
71+
*.settings text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent bomb=maybe
72+
*.appxmanifest text whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent eol=crlf bomb=maybe

Demo/App.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<startup>
3+
<startup>
44
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
55
</startup>
66
</configuration>

Demo/App.xaml

+156-156
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,156 @@
1-
<Application x:Class="MyScript.IInk.Demo.App"
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="clr-namespace:MyScript.IInk.Demo"
5-
xmlns:Font="http://schemas.fontawesome.io/icons/"
6-
StartupUri="MainWindow.xaml">
7-
<Application.Resources>
8-
9-
<Style x:Key="Icon" TargetType="Font:ImageAwesome">
10-
<Setter Property="Foreground" Value="Black"></Setter>
11-
<Style.Triggers>
12-
<Trigger Property="IsMouseOver" Value="True">
13-
<Setter Property="Foreground" Value="Gray"/>
14-
</Trigger>
15-
</Style.Triggers>
16-
</Style>
17-
18-
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="WhiteSmoke" />
19-
20-
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
21-
<Border >
22-
<Grid>
23-
<Grid.ColumnDefinitions>
24-
<ColumnDefinition Width="*" />
25-
<ColumnDefinition Width="auto" />
26-
</Grid.ColumnDefinitions>
27-
<Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="2"
28-
Background="Transparent"
29-
BorderThickness="1" />
30-
<Border
31-
Grid.Column="0"
32-
CornerRadius="2,0,0,2"
33-
Background="Transparent"
34-
BorderThickness="0,0,1,0" />
35-
<Font:ImageAwesome Width="10" Icon="CaretDown" Foreground="Black" ></Font:ImageAwesome>
36-
</Grid>
37-
</Border>
38-
</ControlTemplate>
39-
40-
<ControlTemplate x:Key="ComboBoxTextBox" TargetType="TextBox">
41-
<Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
42-
</ControlTemplate>
43-
44-
<Style x:Key="{x:Type ComboBox}" TargetType="ComboBox">
45-
<Setter Property="Template">
46-
<Setter.Value>
47-
<ControlTemplate TargetType="ComboBox">
48-
<Grid>
49-
<ToggleButton
50-
Name="ToggleButton"
51-
Template="{StaticResource ComboBoxToggleButton}"
52-
Grid.Column="2"
53-
Focusable="false"
54-
IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
55-
ClickMode="Press">
56-
</ToggleButton>
57-
<ContentPresenter
58-
Name="ContentSite"
59-
IsHitTestVisible="False"
60-
Margin="3,3,50,3"
61-
VerticalAlignment="Center"
62-
HorizontalAlignment="Left" />
63-
<TextBox x:Name="PART_EditableTextBox"
64-
Style="{x:Null}"
65-
Template="{StaticResource ComboBoxTextBox}"
66-
HorizontalAlignment="Left"
67-
VerticalAlignment="Center"
68-
Margin="3,3,23,3"
69-
Focusable="True"
70-
Background="Transparent"
71-
Visibility="Hidden"
72-
IsReadOnly="{TemplateBinding IsReadOnly}"/>
73-
<Popup
74-
Name="Popup"
75-
Placement="Bottom"
76-
IsOpen="{TemplateBinding IsDropDownOpen}"
77-
AllowsTransparency="True"
78-
Focusable="False"
79-
PopupAnimation="Slide">
80-
<Grid
81-
Name="DropDown"
82-
SnapsToDevicePixels="True"
83-
MinWidth="{TemplateBinding ActualWidth}"
84-
MaxHeight="{TemplateBinding MaxDropDownHeight}">
85-
<Border
86-
x:Name="DropDownBorder"
87-
Background="{StaticResource WindowBackgroundBrush}"
88-
BorderThickness="1"/>
89-
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
90-
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
91-
</ScrollViewer>
92-
</Grid>
93-
</Popup>
94-
</Grid>
95-
</ControlTemplate>
96-
</Setter.Value>
97-
</Setter>
98-
<Style.Triggers>
99-
</Style.Triggers>
100-
</Style>
101-
102-
<Style
103-
x:Key="ButtonFocusVisual">
104-
<Setter
105-
Property="Control.Template">
106-
<Setter.Value>
107-
<ControlTemplate>
108-
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2" />
109-
</ControlTemplate>
110-
</Setter.Value>
111-
</Setter>
112-
</Style>
113-
114-
<Style x:Key="CustomButton" TargetType="{x:Type Button}">
115-
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
116-
<Setter Property="Margin" Value="20"></Setter>
117-
<Setter Property="Background" Value="Transparent"/>
118-
<Setter Property="Foreground" Value="Black"/>
119-
<Setter Property="HorizontalContentAlignment" Value="Center"/>
120-
<Setter Property="VerticalContentAlignment" Value="Center"/>
121-
<Setter Property="Padding" Value="10 5"/>
122-
<Setter Property="FontSize" Value="14" />
123-
<Setter Property="BorderThickness" Value="0" />
124-
<Setter Property="Template">
125-
<Setter.Value>
126-
<ControlTemplate TargetType="{x:Type Button}">
127-
<Grid >
128-
<Border
129-
x:Name="Border"
130-
Background="{TemplateBinding Background}"
131-
BorderBrush="{TemplateBinding BorderBrush}"
132-
BorderThickness="{TemplateBinding BorderThickness}" />
133-
134-
<ContentPresenter
135-
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
136-
Margin="{TemplateBinding Padding}"
137-
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
138-
RecognizesAccessKey="True" />
139-
</Grid>
140-
<ControlTemplate.Triggers>
141-
<Trigger Property="IsPressed" Value="True">
142-
<Setter Property="OpacityMask" Value="#AA888888"/>
143-
</Trigger>
144-
<Trigger Property="IsMouseOver" Value="True">
145-
<Setter Property="Background" Value="LightGray"/>
146-
</Trigger>
147-
<Trigger Property="IsEnabled" Value="false">
148-
<Setter Property="Foreground" Value="#ADADAD"/>
149-
</Trigger>
150-
</ControlTemplate.Triggers>
151-
</ControlTemplate>
152-
</Setter.Value>
153-
</Setter>
154-
</Style>
155-
</Application.Resources>
156-
</Application>
1+
<Application x:Class="MyScript.IInk.Demo.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:MyScript.IInk.Demo"
5+
xmlns:Font="http://schemas.fontawesome.io/icons/"
6+
StartupUri="MainWindow.xaml">
7+
<Application.Resources>
8+
9+
<Style x:Key="Icon" TargetType="Font:ImageAwesome">
10+
<Setter Property="Foreground" Value="Black"></Setter>
11+
<Style.Triggers>
12+
<Trigger Property="IsMouseOver" Value="True">
13+
<Setter Property="Foreground" Value="Gray"/>
14+
</Trigger>
15+
</Style.Triggers>
16+
</Style>
17+
18+
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="WhiteSmoke" />
19+
20+
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
21+
<Border >
22+
<Grid>
23+
<Grid.ColumnDefinitions>
24+
<ColumnDefinition Width="*" />
25+
<ColumnDefinition Width="auto" />
26+
</Grid.ColumnDefinitions>
27+
<Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="2"
28+
Background="Transparent"
29+
BorderThickness="1" />
30+
<Border
31+
Grid.Column="0"
32+
CornerRadius="2,0,0,2"
33+
Background="Transparent"
34+
BorderThickness="0,0,1,0" />
35+
<Font:ImageAwesome Width="10" Icon="CaretDown" Foreground="Black" ></Font:ImageAwesome>
36+
</Grid>
37+
</Border>
38+
</ControlTemplate>
39+
40+
<ControlTemplate x:Key="ComboBoxTextBox" TargetType="TextBox">
41+
<Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
42+
</ControlTemplate>
43+
44+
<Style x:Key="{x:Type ComboBox}" TargetType="ComboBox">
45+
<Setter Property="Template">
46+
<Setter.Value>
47+
<ControlTemplate TargetType="ComboBox">
48+
<Grid>
49+
<ToggleButton
50+
Name="ToggleButton"
51+
Template="{StaticResource ComboBoxToggleButton}"
52+
Grid.Column="2"
53+
Focusable="false"
54+
IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
55+
ClickMode="Press">
56+
</ToggleButton>
57+
<ContentPresenter
58+
Name="ContentSite"
59+
IsHitTestVisible="False"
60+
Margin="3,3,50,3"
61+
VerticalAlignment="Center"
62+
HorizontalAlignment="Left" />
63+
<TextBox x:Name="PART_EditableTextBox"
64+
Style="{x:Null}"
65+
Template="{StaticResource ComboBoxTextBox}"
66+
HorizontalAlignment="Left"
67+
VerticalAlignment="Center"
68+
Margin="3,3,23,3"
69+
Focusable="True"
70+
Background="Transparent"
71+
Visibility="Hidden"
72+
IsReadOnly="{TemplateBinding IsReadOnly}"/>
73+
<Popup
74+
Name="Popup"
75+
Placement="Bottom"
76+
IsOpen="{TemplateBinding IsDropDownOpen}"
77+
AllowsTransparency="True"
78+
Focusable="False"
79+
PopupAnimation="Slide">
80+
<Grid
81+
Name="DropDown"
82+
SnapsToDevicePixels="True"
83+
MinWidth="{TemplateBinding ActualWidth}"
84+
MaxHeight="{TemplateBinding MaxDropDownHeight}">
85+
<Border
86+
x:Name="DropDownBorder"
87+
Background="{StaticResource WindowBackgroundBrush}"
88+
BorderThickness="1"/>
89+
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
90+
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
91+
</ScrollViewer>
92+
</Grid>
93+
</Popup>
94+
</Grid>
95+
</ControlTemplate>
96+
</Setter.Value>
97+
</Setter>
98+
<Style.Triggers>
99+
</Style.Triggers>
100+
</Style>
101+
102+
<Style
103+
x:Key="ButtonFocusVisual">
104+
<Setter
105+
Property="Control.Template">
106+
<Setter.Value>
107+
<ControlTemplate>
108+
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2" />
109+
</ControlTemplate>
110+
</Setter.Value>
111+
</Setter>
112+
</Style>
113+
114+
<Style x:Key="CustomButton" TargetType="{x:Type Button}">
115+
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
116+
<Setter Property="Margin" Value="20"></Setter>
117+
<Setter Property="Background" Value="Transparent"/>
118+
<Setter Property="Foreground" Value="Black"/>
119+
<Setter Property="HorizontalContentAlignment" Value="Center"/>
120+
<Setter Property="VerticalContentAlignment" Value="Center"/>
121+
<Setter Property="Padding" Value="10 5"/>
122+
<Setter Property="FontSize" Value="14" />
123+
<Setter Property="BorderThickness" Value="0" />
124+
<Setter Property="Template">
125+
<Setter.Value>
126+
<ControlTemplate TargetType="{x:Type Button}">
127+
<Grid >
128+
<Border
129+
x:Name="Border"
130+
Background="{TemplateBinding Background}"
131+
BorderBrush="{TemplateBinding BorderBrush}"
132+
BorderThickness="{TemplateBinding BorderThickness}" />
133+
134+
<ContentPresenter
135+
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
136+
Margin="{TemplateBinding Padding}"
137+
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
138+
RecognizesAccessKey="True" />
139+
</Grid>
140+
<ControlTemplate.Triggers>
141+
<Trigger Property="IsPressed" Value="True">
142+
<Setter Property="OpacityMask" Value="#AA888888"/>
143+
</Trigger>
144+
<Trigger Property="IsMouseOver" Value="True">
145+
<Setter Property="Background" Value="LightGray"/>
146+
</Trigger>
147+
<Trigger Property="IsEnabled" Value="false">
148+
<Setter Property="Foreground" Value="#ADADAD"/>
149+
</Trigger>
150+
</ControlTemplate.Triggers>
151+
</ControlTemplate>
152+
</Setter.Value>
153+
</Setter>
154+
</Style>
155+
</Application.Resources>
156+
</Application>

0 commit comments

Comments
 (0)