fix(*): using TextBlock instead of Label to avoid missing characters like '-', '_', etc.

This commit is contained in:
leo 2020-09-01 17:22:47 +08:00
parent cfce4bddd7
commit 9b452bef8b
32 changed files with 52 additions and 52 deletions

View file

@ -1,4 +1,4 @@
<UserControl x:Class="SourceGit.UI.CherryPick" <UserControl x:Class="SourceGit.UI.CherryPick"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@ -25,7 +25,7 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Commit :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Commit :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}" Margin="4,0"/> <Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}" Margin="4,0"/>
<Label x:Name="desc"/> <TextBlock x:Name="desc" Text="cad" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkCommitChanges" IsChecked="True" Content="Commit the changes"/> <CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkCommitChanges" IsChecked="True" Content="Commit the changes"/>

View file

@ -20,7 +20,7 @@ namespace SourceGit.UI {
repo = opened; repo = opened;
commitSHA = commit.SHA; commitSHA = commit.SHA;
desc.Content = $"{commit.ShortSHA} {commit.Subject}"; desc.Text = $"{commit.ShortSHA} {commit.Subject}";
} }
/// <summary> /// <summary>

View file

@ -34,7 +34,7 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Based On :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Based On :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path x:Name="basedOnType" Width="12" Style="{StaticResource Style.Icon}"/> <Path x:Name="basedOnType" Width="12" Style="{StaticResource Style.Icon}"/>
<Label x:Name="basedOnDesc" VerticalAlignment="Center" Content="master"/> <TextBlock x:Name="basedOnDesc" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center" Text="master"/>
</StackPanel> </StackPanel>
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="New Branch Name :"/> <Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="New Branch Name :"/>

View file

@ -55,7 +55,7 @@ namespace SourceGit.UI {
var dialog = new CreateBranch(repo); var dialog = new CreateBranch(repo);
dialog.based = branch.Name; dialog.based = branch.Name;
dialog.basedOnType.Data = dialog.FindResource("Icon.Branch") as Geometry; dialog.basedOnType.Data = dialog.FindResource("Icon.Branch") as Geometry;
dialog.basedOnDesc.Content = branch.Name; dialog.basedOnDesc.Text = branch.Name;
if (!branch.IsLocal) dialog.txtName.Text = branch.Name.Substring(branch.Remote.Length + 1); if (!branch.IsLocal) dialog.txtName.Text = branch.Name.Substring(branch.Remote.Length + 1);
repo.GetPopupManager()?.Show(dialog); repo.GetPopupManager()?.Show(dialog);
@ -70,7 +70,7 @@ namespace SourceGit.UI {
var dialog = new CreateBranch(repo); var dialog = new CreateBranch(repo);
dialog.based = tag.Name; dialog.based = tag.Name;
dialog.basedOnType.Data = dialog.FindResource("Icon.Tag") as Geometry; dialog.basedOnType.Data = dialog.FindResource("Icon.Tag") as Geometry;
dialog.basedOnDesc.Content = tag.Name; dialog.basedOnDesc.Text = tag.Name;
repo.GetPopupManager()?.Show(dialog); repo.GetPopupManager()?.Show(dialog);
} }
@ -84,7 +84,7 @@ namespace SourceGit.UI {
var dialog = new CreateBranch(repo); var dialog = new CreateBranch(repo);
dialog.based = commit.SHA; dialog.based = commit.SHA;
dialog.basedOnType.Data = dialog.FindResource("Icon.Commit") as Geometry; dialog.basedOnType.Data = dialog.FindResource("Icon.Commit") as Geometry;
dialog.basedOnDesc.Content = $"{commit.ShortSHA} {commit.Subject}"; dialog.basedOnDesc.Text = $"{commit.ShortSHA} {commit.Subject}";
repo.GetPopupManager()?.Show(dialog); repo.GetPopupManager()?.Show(dialog);
} }

View file

@ -28,7 +28,7 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="New Tag At :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="New Tag At :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" x:Name="basedOnType" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}"/> <Path Width="12" x:Name="basedOnType" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}"/>
<Label x:Name="basedOnDesc" VerticalAlignment="Center" Content="xxx"/> <TextBlock x:Name="basedOnDesc" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center" Text="xxx"/>
</StackPanel> </StackPanel>
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Tag Name :"/> <Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Tag Name :"/>

View file

@ -50,7 +50,7 @@ namespace SourceGit.UI {
var dialog = new CreateTag(repo); var dialog = new CreateTag(repo);
dialog.based = branch.Head; dialog.based = branch.Head;
dialog.basedOnType.Data = dialog.FindResource("Icon.Branch") as Geometry; dialog.basedOnType.Data = dialog.FindResource("Icon.Branch") as Geometry;
dialog.basedOnDesc.Content = branch.Name; dialog.basedOnDesc.Text = branch.Name;
repo.GetPopupManager()?.Show(dialog); repo.GetPopupManager()?.Show(dialog);
} }
@ -64,7 +64,7 @@ namespace SourceGit.UI {
var dialog = new CreateTag(repo); var dialog = new CreateTag(repo);
dialog.based = commit.SHA; dialog.based = commit.SHA;
dialog.basedOnType.Data = dialog.FindResource("Icon.Commit") as Geometry; dialog.basedOnType.Data = dialog.FindResource("Icon.Commit") as Geometry;
dialog.basedOnDesc.Content = $"{commit.ShortSHA} {commit.Subject}"; dialog.basedOnDesc.Text = $"{commit.ShortSHA} {commit.Subject}";
repo.GetPopupManager()?.Show(dialog); repo.GetPopupManager()?.Show(dialog);
} }

View file

@ -25,7 +25,7 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Branch :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Branch :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}" Margin="4,0"/> <Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}" Margin="4,0"/>
<Label x:Name="branchName"/> <TextBlock x:Name="branchName" Text="master" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Grid Grid.Row="4" Grid.ColumnSpan="2"> <Grid Grid.Row="4" Grid.ColumnSpan="2">

View file

@ -19,7 +19,7 @@ namespace SourceGit.UI {
InitializeComponent(); InitializeComponent();
repo = opened; repo = opened;
branch = target; branch = target;
branchName.Content = target.Name; branchName.Text = target.Name;
} }
/// <summary> /// <summary>

View file

@ -24,7 +24,7 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Remote :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Remote :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}" Margin="4,0"/> <Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}" Margin="4,0"/>
<Label x:Name="remoteName"/> <TextBlock x:Name="remoteName" Text="origin" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Grid Grid.Row="4" Grid.ColumnSpan="2"> <Grid Grid.Row="4" Grid.ColumnSpan="2">

View file

@ -20,7 +20,7 @@ namespace SourceGit.UI {
InitializeComponent(); InitializeComponent();
repo = opened; repo = opened;
remote = target; remote = target;
remoteName.Content = target; remoteName.Text = target;
} }
/// <summary> /// <summary>

View file

@ -25,7 +25,7 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Tag :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Tag :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Tag}" Margin="4,0"/> <Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Tag}" Margin="4,0"/>
<Label x:Name="tagName"/> <TextBlock x:Name="tagName" Text="v1.0" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkWithRemote" Content="Delete from remote repositories"/> <CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkWithRemote" Content="Delete from remote repositories"/>

View file

@ -21,7 +21,7 @@ namespace SourceGit.UI {
this.tag = tag; this.tag = tag;
InitializeComponent(); InitializeComponent();
tagName.Content = tag.Name; tagName.Text = tag.Name;
} }
/// <summary> /// <summary>

View file

@ -26,7 +26,7 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Changes :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Changes :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path x:Name="icon" Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.File}" Fill="{StaticResource Brush.FG2}" Margin="4,0"/> <Path x:Name="icon" Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.File}" Fill="{StaticResource Brush.FG2}" Margin="4,0"/>
<Label x:Name="txtPath"/> <TextBlock x:Name="txtPath" Text="xxxx" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Label Grid.Row="3" Grid.Column="1" Content="You can't undo this action!!!" Foreground="{StaticResource Brush.FG2}"/> <Label Grid.Row="3" Grid.Column="1" Content="You can't undo this action!!!" Foreground="{StaticResource Brush.FG2}"/>

View file

@ -25,12 +25,12 @@ namespace SourceGit.UI {
InitializeComponent(); InitializeComponent();
if (changes == null || changes.Count == 0) { if (changes == null || changes.Count == 0) {
txtPath.Content = "All local changes in working copy."; txtPath.Text = "All local changes in working copy.";
icon.Data = FindResource("Icon.Folder") as Geometry; icon.Data = FindResource("Icon.Folder") as Geometry;
} else if (changes.Count == 1) { } else if (changes.Count == 1) {
txtPath.Content = changes[0].Path; txtPath.Text = changes[0].Path;
} else { } else {
txtPath.Content = $"Total {changes.Count} changes ..."; txtPath.Text = $"Total {changes.Count} changes ...";
} }
} }

View file

@ -35,7 +35,7 @@
<DataTemplate DataType="{x:Type git:Remote}"> <DataTemplate DataType="{x:Type git:Remote}">
<StackPanel Orientation="Horizontal" Height="20"> <StackPanel Orientation="Horizontal" Height="20">
<Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}"/> <Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}"/>
<Label Content="{Binding Name}" Padding="8,0,0,0"/> <TextBlock Text="{Binding Name}" Padding="8,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>

View file

@ -24,7 +24,7 @@
<Label Grid.Row="2" Grid.Column="0" x:Name="txtBranchType" HorizontalAlignment="Right"/> <Label Grid.Row="2" Grid.Column="0" x:Name="txtBranchType" HorizontalAlignment="Right"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}" Margin="4,0"/> <Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}" Margin="4,0"/>
<Label x:Name="txtBranchName"/> <TextBlock x:Name="txtBranchName" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Grid Grid.Row="4" Grid.ColumnSpan="2"> <Grid Grid.Row="4" Grid.ColumnSpan="2">

View file

@ -40,7 +40,7 @@ namespace SourceGit.UI {
return; return;
} }
txtBranchName.Content = branch.Name; txtBranchName.Text = branch.Name;
} }
/// <summary> /// <summary>

View file

@ -27,13 +27,13 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Source Branch :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Source Branch :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/> <Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
<Label x:Name="sourceBranch"/> <TextBlock x:Name="sourceBranch" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Into :"/> <Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Into :"/>
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/> <Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
<Label x:Name="targetBranch"/> <TextBlock x:Name="targetBranch" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="Merge Option :"/> <Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="Merge Option :"/>

View file

@ -35,8 +35,8 @@ namespace SourceGit.UI {
InitializeComponent(); InitializeComponent();
repo = opened; repo = opened;
sourceBranch.Content = source; sourceBranch.Text = source;
targetBranch.Content = dest; targetBranch.Text = dest;
combOptions.ItemsSource = new Option[] { combOptions.ItemsSource = new Option[] {
new Option("Default", "Fast-forward if possible", ""), new Option("Default", "Fast-forward if possible", ""),
new Option("No Fast-forward", "Always create a merge commit", "--no-ff"), new Option("No Fast-forward", "Always create a merge commit", "--no-ff"),
@ -85,7 +85,7 @@ namespace SourceGit.UI {
var popup = repo.GetPopupManager(); var popup = repo.GetPopupManager();
popup?.Lock(); popup?.Lock();
var branch = sourceBranch.Content as string; var branch = sourceBranch.Text;
var opt = combOptions.SelectedItem as Option; var opt = combOptions.SelectedItem as Option;
await Task.Run(() => repo.Merge(branch, opt.Arg)); await Task.Run(() => repo.Merge(branch, opt.Arg));

View file

@ -34,7 +34,7 @@
<DataTemplate> <DataTemplate>
<StackPanel Orientation="Horizontal" Height="20"> <StackPanel Orientation="Horizontal" Height="20">
<Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}"/> <Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}"/>
<Label Content="{Binding}" Padding="8,0,0,0"/> <TextBlock Text="{Binding}" Padding="8,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
@ -48,7 +48,7 @@
<DataTemplate> <DataTemplate>
<StackPanel Orientation="Horizontal" Height="20"> <StackPanel Orientation="Horizontal" Height="20">
<Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/> <Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
<Label Content="{Binding}" Padding="8,0,0,0"/> <TextBlock Text="{Binding}" Padding="8,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
@ -57,7 +57,7 @@
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Into :"/> <Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Content="Into :"/>
<StackPanel Grid.Row="4" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="4" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/> <Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
<Label x:Name="txtInto" VerticalAlignment="Center"/> <TextBlock x:Name="txtInto" Text="master" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<CheckBox Grid.Row="5" Grid.Column="1" <CheckBox Grid.Row="5" Grid.Column="1"

View file

@ -58,7 +58,7 @@ namespace SourceGit.UI {
preferBranch = upstream; preferBranch = upstream;
} }
txtInto.Content = current.Name; txtInto.Text = current.Name;
combRemotes.ItemsSource = remotes; combRemotes.ItemsSource = remotes;
combRemotes.SelectedItem = preferRemote; combRemotes.SelectedItem = preferRemote;
} }

View file

@ -35,7 +35,7 @@
<DataTemplate DataType="{x:Type git:Branch}"> <DataTemplate DataType="{x:Type git:Branch}">
<StackPanel Orientation="Horizontal" Height="20"> <StackPanel Orientation="Horizontal" Height="20">
<Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/> <Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
<Label Content="{Binding Name}" Padding="8,0,0,0"/> <TextBlock Text="{Binding Name}" Padding="8,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
@ -50,7 +50,7 @@
<DataTemplate> <DataTemplate>
<StackPanel Orientation="Horizontal" Height="20"> <StackPanel Orientation="Horizontal" Height="20">
<Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}"/> <Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}"/>
<Label Content="{Binding}" Padding="8,0,0,0"/> <TextBlock Text="{Binding}" Padding="8,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
@ -64,7 +64,7 @@
<DataTemplate> <DataTemplate>
<StackPanel Orientation="Horizontal" Height="20"> <StackPanel Orientation="Horizontal" Height="20">
<Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/> <Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
<Label Content="{Binding}" Padding="8,0,0,0"/> <TextBlock Text="{Binding}" Padding="8,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>

View file

@ -25,7 +25,7 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Tag :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Tag :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Tag}" Margin="4,0"/> <Path Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Tag}" Margin="4,0"/>
<Label x:Name="tagName"/> <TextBlock x:Name="tagName" Text="v1.0" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Remote :"/> <Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Remote :"/>
@ -36,7 +36,7 @@
<DataTemplate> <DataTemplate>
<StackPanel Orientation="Horizontal" Height="20"> <StackPanel Orientation="Horizontal" Height="20">
<Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}"/> <Path Margin="4,0,0,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}"/>
<Label Content="{Binding Name}" Padding="8,0,0,0"/> <TextBlock Text="{Binding Name}" Padding="8,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>

View file

@ -21,7 +21,7 @@ namespace SourceGit.UI {
this.tag = tag; this.tag = tag;
InitializeComponent(); InitializeComponent();
tagName.Content = tag.Name; tagName.Text = tag.Name;
combRemotes.ItemsSource = repo.Remotes(); combRemotes.ItemsSource = repo.Remotes();
combRemotes.SelectedIndex = 0; combRemotes.SelectedIndex = 0;
} }

View file

@ -26,13 +26,13 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Rebase :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Rebase :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/> <Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
<Label x:Name="branch"/> <TextBlock x:Name="branch" Text="master" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="On :"/> <Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="On :"/>
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
<Path x:Name="type" Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/> <Path x:Name="type" Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
<Label x:Name="desc"/> <TextBlock x:Name="desc" Text="branch" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<CheckBox x:Name="chkAutoStash" <CheckBox x:Name="chkAutoStash"

View file

@ -34,9 +34,9 @@ namespace SourceGit.UI {
var dialog = new Rebase(opened); var dialog = new Rebase(opened);
dialog.based = branch.Head; dialog.based = branch.Head;
dialog.branch.Content = current.Name; dialog.branch.Text = current.Name;
dialog.type.Data = dialog.FindResource("Icon.Branch") as Geometry; dialog.type.Data = dialog.FindResource("Icon.Branch") as Geometry;
dialog.desc.Content = branch.Name; dialog.desc.Text = branch.Name;
opened.GetPopupManager()?.Show(dialog); opened.GetPopupManager()?.Show(dialog);
} }
@ -52,9 +52,9 @@ namespace SourceGit.UI {
var dialog = new Rebase(opened); var dialog = new Rebase(opened);
dialog.based = commit.SHA; dialog.based = commit.SHA;
dialog.branch.Content = current.Name; dialog.branch.Text = current.Name;
dialog.type.Data = dialog.FindResource("Icon.Commit") as Geometry; dialog.type.Data = dialog.FindResource("Icon.Commit") as Geometry;
dialog.desc.Content = $"{commit.ShortSHA} {commit.Subject}"; dialog.desc.Text = $"{commit.ShortSHA} {commit.Subject}";
opened.GetPopupManager()?.Show(dialog); opened.GetPopupManager()?.Show(dialog);
} }

View file

@ -27,7 +27,7 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Branch :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Branch :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/> <Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
<Label x:Name="txtOldName"/> <TextBlock x:Name="txtOldName" Text="Old name" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="New Name :"/> <Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="New Name :"/>

View file

@ -29,7 +29,7 @@ namespace SourceGit.UI {
InitializeComponent(); InitializeComponent();
nameValidator.Repo = opened; nameValidator.Repo = opened;
txtOldName.Content = target.Name; txtOldName.Text = target.Name;
} }
/// <summary> /// <summary>

View file

@ -26,13 +26,13 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Current Branch :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Current Branch :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/> <Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
<Label x:Name="branch"/> <TextBlock x:Name="branch" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Move To :"/> <Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Move To :"/>
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
<Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}"/> <Path Width="12" Height="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}"/>
<Label x:Name="desc"/> <TextBlock x:Name="desc" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="Reset Mode :"/> <Label Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Content="Reset Mode :"/>

View file

@ -40,8 +40,8 @@ namespace SourceGit.UI {
repo = opened; repo = opened;
revision = commit.SHA; revision = commit.SHA;
branch.Content = current.Name; branch.Text = current.Name;
desc.Content = $"{commit.ShortSHA} {commit.Subject}"; desc.Text = $"{commit.ShortSHA} {commit.Subject}";
combMode.ItemsSource = new Mode[] { combMode.ItemsSource = new Mode[] {
new Mode(Brushes.Green, "Soft", "Keep all changes. Stage differences", "--soft"), new Mode(Brushes.Green, "Soft", "Keep all changes. Stage differences", "--soft"),
new Mode(Brushes.Yellow, "Mixed", "Keep all changes. Unstage differences", "--mixed"), new Mode(Brushes.Yellow, "Mixed", "Keep all changes. Unstage differences", "--mixed"),

View file

@ -25,7 +25,7 @@
<Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Commit :"/> <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Commit :"/>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
<Path x:Name="icon" Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}" Margin="4,0"/> <Path x:Name="icon" Width="12" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Commit}" Margin="4,0"/>
<Label x:Name="txtDesc"/> <TextBlock x:Name="txtDesc" Padding="4,0,0,0" Foreground="{StaticResource Brush.FG}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkCommit" Content="Commit revert changes" IsChecked="True"/> <CheckBox Grid.Row="3" Grid.Column="1" x:Name="chkCommit" Content="Commit revert changes" IsChecked="True"/>

View file

@ -21,7 +21,7 @@ namespace SourceGit.UI {
sha = commit.SHA; sha = commit.SHA;
InitializeComponent(); InitializeComponent();
txtDesc.Content = $"{commit.ShortSHA} {commit.Subject}"; txtDesc.Text = $"{commit.ShortSHA} {commit.Subject}";
} }
/// <summary> /// <summary>