mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
style<*>: commit's SHA display style in popups
This commit is contained in:
parent
9f68fcaf30
commit
0d34bd1c82
18 changed files with 73 additions and 26 deletions
|
@ -30,7 +30,10 @@
|
|||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Path x:Name="iconBased" Width="14" Height="14" Data="{StaticResource Icon.Commit}"/>
|
||||
<TextBlock x:Name="txtBased" Margin="8,0,0,0"/>
|
||||
<Border x:Name="badgeSHA" Background="{DynamicResource Brush.Badge}" Margin="4,0" Padding="4,2" CornerRadius="4" Visibility="Collapsed">
|
||||
<TextBlock x:Name="txtSHA"/>
|
||||
</Border>
|
||||
<TextBlock x:Name="txtBased"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
|
|
|
@ -35,7 +35,9 @@ namespace SourceGit.Views.Popups {
|
|||
InitializeComponent();
|
||||
|
||||
iconBased.Data = FindResource("Icon.Commit") as Geometry;
|
||||
txtBased.Text = $"{revision.ShortSHA} {revision.Subject}";
|
||||
txtSHA.Text = revision.ShortSHA;
|
||||
badgeSHA.Visibility = Visibility.Visible;
|
||||
txtBased.Text = revision.Subject;
|
||||
}
|
||||
|
||||
public Archive(string repo, Models.Tag tag) {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
@ -28,7 +28,10 @@
|
|||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Path Width="14" Height="14" Data="{StaticResource Icon.Commit}"/>
|
||||
<TextBlock x:Name="txtCommit" Margin="8,0,0,0"/>
|
||||
<Border Background="{DynamicResource Brush.Badge}" Margin="4,0" Padding="4,2" CornerRadius="4">
|
||||
<TextBlock x:Name="txtSHA"/>
|
||||
</Border>
|
||||
<TextBlock x:Name="txtCommit"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox
|
||||
|
|
|
@ -14,7 +14,8 @@ namespace SourceGit.Views.Popups {
|
|||
|
||||
InitializeComponent();
|
||||
|
||||
txtCommit.Text = $"{commit.ShortSHA} {commit.Subject}";
|
||||
txtSHA.Text = commit.ShortSHA;
|
||||
txtCommit.Text = commit.Subject;
|
||||
}
|
||||
|
||||
public override string GetTitle() {
|
||||
|
|
|
@ -37,7 +37,10 @@
|
|||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Path x:Name="iconBased" Width="14" Height="14" Data="{StaticResource Icon.Branch}"/>
|
||||
<TextBlock x:Name="txtBased" Margin="8,0,0,0"/>
|
||||
<Border x:Name="badgeSHA" Background="{DynamicResource Brush.Badge}" Margin="4,0,0,0" Padding="4,2" CornerRadius="4" Visibility="Collapsed">
|
||||
<TextBlock x:Name="txtSHA"/>
|
||||
</Border>
|
||||
<TextBlock x:Name="txtBased" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
|
@ -34,7 +35,9 @@ namespace SourceGit.Views.Popups {
|
|||
|
||||
ruleBranch.Repo = repo;
|
||||
iconBased.Data = FindResource("Icon.Commit") as Geometry;
|
||||
txtBased.Text = $"{commit.ShortSHA} {commit.Subject}";
|
||||
txtSHA.Text = commit.ShortSHA;
|
||||
txtBased.Text = commit.Subject;
|
||||
badgeSHA.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
public CreateBranch(Models.Repository repo, Models.Tag tag) {
|
||||
|
|
|
@ -31,7 +31,10 @@
|
|||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Path x:Name="iconBased" Width="14" Height="14" Data="{StaticResource Icon.Branch}"/>
|
||||
<TextBlock x:Name="txtBased" Margin="8,0,0,0"/>
|
||||
<Border x:Name="badgeSHA" Background="{DynamicResource Brush.Badge}" Margin="4,0,0,0" Padding="4,2" CornerRadius="4" Visibility="Collapsed">
|
||||
<TextBlock x:Name="txtSHA"/>
|
||||
</Border>
|
||||
<TextBlock x:Name="txtBased" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
|
|
|
@ -33,7 +33,9 @@ namespace SourceGit.Views.Popups {
|
|||
|
||||
ruleTag.Tags = new Commands.Tags(repo.Path).Result();
|
||||
iconBased.Data = FindResource("Icon.Commit") as Geometry;
|
||||
txtBased.Text = $"{commit.ShortSHA} {commit.Subject}";
|
||||
txtSHA.Text = commit.ShortSHA;
|
||||
txtBased.Text = commit.Subject;
|
||||
badgeSHA.Visibility = System.Windows.Visibility.Visible;
|
||||
}
|
||||
|
||||
public override string GetTitle() {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
@ -42,7 +42,10 @@
|
|||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Path x:Name="iconBased" Width="14" Height="14" Data="{StaticResource Icon.Branch}"/>
|
||||
<TextBlock x:Name="txtOn" Margin="8,0,0,0"/>
|
||||
<Border x:Name="badgeSHA" Background="{DynamicResource Brush.Badge}" Margin="4,0,0,0" Padding="4,2" CornerRadius="4" Visibility="Collapsed">
|
||||
<TextBlock x:Name="txtSHA"/>
|
||||
</Border>
|
||||
<TextBlock x:Name="txtOn" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox
|
||||
|
|
|
@ -27,8 +27,10 @@ namespace SourceGit.Views.Popups {
|
|||
InitializeComponent();
|
||||
|
||||
txtCurrent.Text = current;
|
||||
txtOn.Text = $"{commit.ShortSHA} {commit.Subject}";
|
||||
iconBased.Data = FindResource("Icon.Branch") as Geometry;
|
||||
txtSHA.Text = commit.ShortSHA;
|
||||
txtOn.Text = commit.Subject;
|
||||
badgeSHA.Visibility = System.Windows.Visibility.Visible;
|
||||
iconBased.Data = FindResource("Icon.Commit") as Geometry;
|
||||
}
|
||||
|
||||
public override string GetTitle() {
|
||||
|
|
|
@ -43,7 +43,10 @@
|
|||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Path Width="14" Height="14" Data="{StaticResource Icon.Commit}"/>
|
||||
<TextBlock x:Name="txtMoveTo" Margin="8,0,0,0"/>
|
||||
<Border Background="{DynamicResource Brush.Badge}" Margin="4,0,0,0" Padding="4,2" CornerRadius="4">
|
||||
<TextBlock x:Name="txtSHA"/>
|
||||
</Border>
|
||||
<TextBlock x:Name="txtMoveTo" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
|
|
|
@ -15,7 +15,8 @@ namespace SourceGit.Views.Popups {
|
|||
InitializeComponent();
|
||||
|
||||
txtCurrent.Text = current;
|
||||
txtMoveTo.Text = $"{to.ShortSHA} {to.Subject}";
|
||||
txtSHA.Text = to.ShortSHA;
|
||||
txtMoveTo.Text = to.Subject;
|
||||
}
|
||||
|
||||
public override string GetTitle() {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
@ -28,7 +28,10 @@
|
|||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Path Width="14" Height="14" Data="{StaticResource Icon.Commit}"/>
|
||||
<TextBlock x:Name="txtCommit" Margin="8,0,0,0"/>
|
||||
<Border Background="{DynamicResource Brush.Badge}" Margin="4,0,0,0" Padding="4,2" CornerRadius="4">
|
||||
<TextBlock x:Name="txtSHA"/>
|
||||
</Border>
|
||||
<TextBlock x:Name="txtCommit" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox
|
||||
|
|
|
@ -14,7 +14,8 @@ namespace SourceGit.Views.Popups {
|
|||
|
||||
InitializeComponent();
|
||||
|
||||
txtCommit.Text = $"{commit.ShortSHA} {commit.Subject}";
|
||||
txtSHA.Text = commit.ShortSHA;
|
||||
txtCommit.Text = commit.Subject;
|
||||
}
|
||||
|
||||
public override string GetTitle() {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
@ -30,7 +30,10 @@
|
|||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Path Width="14" Height="14" Data="{StaticResource Icon.Commit}"/>
|
||||
<TextBlock x:Name="txtCurrent" Margin="8,0,0,0"/>
|
||||
<Border Background="{DynamicResource Brush.Badge}" Margin="4,0,0,0" Padding="4,2" CornerRadius="4">
|
||||
<TextBlock x:Name="txtSHA"/>
|
||||
</Border>
|
||||
<TextBlock x:Name="txtCurrent" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
|
|
|
@ -16,7 +16,9 @@ namespace SourceGit.Views.Popups {
|
|||
this.old = $"{commit.Subject}\n{commit.Message}".Trim();
|
||||
this.Msg = old;
|
||||
InitializeComponent();
|
||||
txtCurrent.Text = $"{commit.ShortSHA} {commit.Subject}";
|
||||
|
||||
txtSHA.Text = commit.ShortSHA;
|
||||
txtCurrent.Text = commit.Subject;
|
||||
}
|
||||
|
||||
public override string GetTitle() {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
@ -31,7 +31,10 @@
|
|||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Path Width="14" Height="14" Data="{StaticResource Icon.Commit}"/>
|
||||
<TextBlock x:Name="txtHead" Margin="8,0,0,0"/>
|
||||
<Border Background="{DynamicResource Brush.Badge}" Margin="4,0,0,0" Padding="4,2" CornerRadius="4">
|
||||
<TextBlock x:Name="txtHeadSHA"/>
|
||||
</Border>
|
||||
<TextBlock x:Name="txtHead" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
|
@ -44,7 +47,10 @@
|
|||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Path Width="14" Height="14" Data="{StaticResource Icon.Commit}"/>
|
||||
<TextBlock x:Name="txtParent" Margin="8,0,0,0"/>
|
||||
<Border Background="{DynamicResource Brush.Badge}" Margin="4,0,0,0" Padding="4,2" CornerRadius="4">
|
||||
<TextBlock x:Name="txtParentSHA"/>
|
||||
</Border>
|
||||
<TextBlock x:Name="txtParent" Margin="4,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
|
|
|
@ -16,8 +16,11 @@ namespace SourceGit.Views.Popups {
|
|||
this.to = parent.SHA;
|
||||
this.Msg = $"{parent.Subject}\n{parent.Message}".Trim();
|
||||
InitializeComponent();
|
||||
txtHead.Text = $"{head.ShortSHA} {head.Subject}";
|
||||
txtParent.Text = $"{parent.ShortSHA} {parent.Subject}";
|
||||
|
||||
txtHeadSHA.Text = head.ShortSHA;
|
||||
txtHead.Text = head.Subject;
|
||||
txtParentSHA.Text = parent.ShortSHA;
|
||||
txtParent.Text = parent.Subject;
|
||||
}
|
||||
|
||||
public override string GetTitle() {
|
||||
|
|
Loading…
Reference in a new issue