mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-04 02:25:00 +00:00
feature: show submodule's URL in tooltip (#1307)
This commit is contained in:
parent
20a239621b
commit
61bb0f7dc7
7 changed files with 81 additions and 15 deletions
|
@ -356,19 +356,30 @@
|
|||
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Text="{Binding Path}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid RowDefinitions="24,24" ColumnDefinitions="Auto,Auto" Margin="0,8,0,0">
|
||||
<Grid RowDefinitions="24,24,24" ColumnDefinitions="Auto,Auto" Margin="0,8,0,0">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.SHA}" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Margin="8,0,0,0" Text="{Binding SHA}" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="1"
|
||||
Margin="8,0,0,0"
|
||||
Text="{Binding SHA}"
|
||||
Foreground="DarkOrange"
|
||||
VerticalAlignment="Center"/>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.Submodule.Status}" VerticalAlignment="Center"/>
|
||||
<Path Grid.Row="1" Grid.Column="1"
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.Submodule.URL}" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1"
|
||||
Margin="8,0,0,0"
|
||||
Text="{Binding URL}"
|
||||
Foreground="{DynamicResource Brush.Link}"
|
||||
VerticalAlignment="Center"/>
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.Submodule.Status}" VerticalAlignment="Center"/>
|
||||
<Path Grid.Row="2" Grid.Column="1"
|
||||
Margin="8,0,0,0"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
Width="12" Height="12"
|
||||
Data="{StaticResource Icons.Check}"
|
||||
Fill="Green"
|
||||
IsVisible="{Binding Status, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:SubmoduleStatus.Normal}}"/>
|
||||
<Border Grid.Row="1" Grid.Column="1"
|
||||
<Border Grid.Row="2" Grid.Column="1"
|
||||
Height="16"
|
||||
Margin="8,0,0,0" Padding="4,0"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Center"
|
||||
|
@ -393,7 +404,7 @@
|
|||
Foreground="White"
|
||||
IsVisible="{Binding Status, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:SubmoduleStatus.Unmerged}}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</ToolTip.Tip>
|
||||
|
|
|
@ -192,7 +192,7 @@ namespace SourceGit.Views
|
|||
|
||||
private void OnDoubleTappedSubmodule(object sender, TappedEventArgs e)
|
||||
{
|
||||
if (sender is ListBox { SelectedItem: Models.Submodule submodule } &&
|
||||
if (sender is ListBox { SelectedItem: Models.Submodule submodule } &&
|
||||
submodule.Status != Models.SubmoduleStatus.NotInited &&
|
||||
DataContext is ViewModels.Repository repo)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue