|
12 | 12 | BorderThickness="1" |
13 | 13 | BorderBrush="{DynamicResource Brush.Border2}" |
14 | 14 | CornerRadius="4"> |
15 | | - <Grid RowDefinitions="Auto,1,*"> |
16 | | - <Grid Grid.Row="0" ColumnDefinitions="*,1,Auto"> |
17 | | - <v:EnhancedTextBox Grid.Column="0" |
18 | | - x:Name="SubjectEditor" |
19 | | - Classes="no_border" |
20 | | - Margin="0" |
21 | | - Padding="4" |
22 | | - CornerRadius="4,4,0,0" |
23 | | - BorderThickness="0" |
24 | | - Background="Transparent" |
25 | | - AcceptsReturn="False" |
26 | | - TextWrapping="Wrap" |
27 | | - ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
28 | | - ScrollViewer.VerticalScrollBarVisibility="Disabled" |
29 | | - Text="{Binding #ThisControl.Subject, Mode=TwoWay}" |
30 | | - Watermark="{DynamicResource Text.CommitMessageTextBox.SubjectPlaceholder}" |
31 | | - PreviewKeyDown="OnSubjectTextBoxPreviewKeyDown"/> |
32 | | - |
33 | | - <Rectangle Grid.Column="1" |
34 | | - Width="1" |
35 | | - HorizontalAlignment="Center" |
36 | | - VerticalAlignment="Stretch" |
37 | | - IsHitTestVisible="False" |
38 | | - Fill="{DynamicResource Brush.Border2}"/> |
39 | | - |
40 | | - <StackPanel Grid.Column="2" |
41 | | - Margin="8,0" |
42 | | - VerticalAlignment="Center" |
43 | | - Orientation="Horizontal"> |
44 | | - <TextBlock Classes="primary" Margin="2,0,0,0" FontSize="11" Text="{Binding #ThisControl.Subject.Length}" IsVisible="{Binding #ThisControl.Subject.Length, Converter={x:Static c:IntConverters.IsSubjectLengthGood}}"/> |
45 | | - <TextBlock Classes="primary" Margin="2,0,0,0" FontSize="11" Foreground="DarkGoldenrod" Text="{Binding #ThisControl.Subject.Length}" IsVisible="{Binding #ThisControl.Subject.Length, Converter={x:Static c:IntConverters.IsSubjectLengthBad}}"/> |
46 | | - <TextBlock Classes="primary" FontSize="11" Text="/"/> |
47 | | - <TextBlock Classes="primary" FontSize="11" Text="{Binding Source={x:Static vm:Preferences.Instance}, Path=SubjectGuideLength}"/> |
48 | | - <Path Width="10" Height="10" Margin="4,0,0,0" Data="{StaticResource Icons.Error}" Fill="DarkGoldenrod" IsVisible="{Binding #ThisControl.Subject.Length, Converter={x:Static c:IntConverters.IsSubjectLengthBad}}"/> |
49 | | - </StackPanel> |
50 | | - </Grid> |
| 15 | + <Grid RowDefinitions="Auto,1,*,1,24"> |
| 16 | + <v:EnhancedTextBox Grid.Row="0" |
| 17 | + x:Name="SubjectEditor" |
| 18 | + Classes="no_border" |
| 19 | + Margin="0" |
| 20 | + Padding="4" |
| 21 | + CornerRadius="4,4,0,0" |
| 22 | + BorderThickness="0" |
| 23 | + Background="Transparent" |
| 24 | + AcceptsReturn="False" |
| 25 | + TextWrapping="Wrap" |
| 26 | + ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
| 27 | + ScrollViewer.VerticalScrollBarVisibility="Disabled" |
| 28 | + Text="{Binding #ThisControl.Subject, Mode=TwoWay}" |
| 29 | + Watermark="{DynamicResource Text.CommitMessageTextBox.SubjectPlaceholder}" |
| 30 | + PreviewKeyDown="OnSubjectTextBoxPreviewKeyDown"/> |
51 | 31 |
|
52 | 32 | <Rectangle Grid.Row="1" |
53 | 33 | Height="1" |
|
61 | 41 | Classes="no_border" |
62 | 42 | Margin="0" |
63 | 43 | Padding="4" |
64 | | - CornerRadius="0,0,4,4" |
65 | 44 | BorderThickness="0" |
66 | 45 | Background="Transparent" |
67 | 46 | VerticalContentAlignment="Top" |
|
73 | 52 | Text="{Binding #ThisControl.Description, Mode=TwoWay}" |
74 | 53 | Watermark="{DynamicResource Text.CommitMessageTextBox.MessagePlaceholder}" |
75 | 54 | PreviewKeyDown="OnDescriptionTextBoxPreviewKeyDown"/> |
| 55 | + |
| 56 | + <Rectangle Grid.Row="3" |
| 57 | + Height="1" |
| 58 | + HorizontalAlignment="Stretch" |
| 59 | + VerticalAlignment="Center" |
| 60 | + IsHitTestVisible="False" |
| 61 | + Fill="{DynamicResource Brush.Border2}"/> |
| 62 | + |
| 63 | + <Border Grid.Row="4" |
| 64 | + Background="{DynamicResource Brush.Window}" |
| 65 | + BorderThickness="1,0,0,0" |
| 66 | + CornerRadius="0,0,4,4"> |
| 67 | + <Grid ColumnDefinitions="*,Auto,Auto" Margin="0,4"> |
| 68 | + <StackPanel Grid.Column="0" |
| 69 | + Margin="8,0" |
| 70 | + VerticalAlignment="Center" |
| 71 | + Orientation="Horizontal"> |
| 72 | + <TextBlock Classes="info_label" FontSize="13" Text="{DynamicResource Text.CommitMessageTextBox.SubjectCount}"/> |
| 73 | + <TextBlock Classes="primary" Margin="8,0,0,0" FontSize="11" Text="{Binding #ThisControl.Subject.Length}" IsVisible="{Binding #ThisControl.Subject.Length, Converter={x:Static c:IntConverters.IsSubjectLengthGood}}" VerticalAlignment="Center"/> |
| 74 | + <TextBlock Classes="primary" Margin="8,0,0,0" FontSize="11" Foreground="DarkGoldenrod" Text="{Binding #ThisControl.Subject.Length}" IsVisible="{Binding #ThisControl.Subject.Length, Converter={x:Static c:IntConverters.IsSubjectLengthBad}}" VerticalAlignment="Center"/> |
| 75 | + <TextBlock Classes="primary" FontSize="11" Text="/" VerticalAlignment="Center"/> |
| 76 | + <TextBlock Classes="primary" FontSize="11" Text="{Binding Source={x:Static vm:Preferences.Instance}, Path=SubjectGuideLength}" VerticalAlignment="Center"/> |
| 77 | + <Path Width="10" Height="10" Margin="4,0,0,0" Data="{StaticResource Icons.Error}" Fill="DarkGoldenrod" IsVisible="{Binding #ThisControl.Subject.Length, Converter={x:Static c:IntConverters.IsSubjectLengthBad}}"/> |
| 78 | + </StackPanel> |
| 79 | + |
| 80 | + <Button Grid.Column="1" Width="20" Margin="0,0,4,0" Padding="0" Classes="icon_button" Click="OnOpenConventionalCommitHelper" ToolTip.Tip="{DynamicResource Text.ConventionalCommit}"> |
| 81 | + <Path Width="13" Height="13" Margin="0,1,0,0" Data="{StaticResource Icons.CommitMessageGenerator}"/> |
| 82 | + </Button> |
| 83 | + |
| 84 | + <Button Grid.Column="2" Width="20" Margin="0,0,4,0" Padding="0" Classes="icon_button" Click="CopyAllText" ToolTip.Tip="{DynamicResource Text.CopyAllText}"> |
| 85 | + <Path Width="13" Height="13" Data="{StaticResource Icons.Copy}"/> |
| 86 | + </Button> |
| 87 | + </Grid> |
| 88 | + </Border> |
76 | 89 | </Grid> |
77 | 90 | </Border> |
78 | 91 | </UserControl> |
|
0 commit comments