mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
style<Histories>: show guide directly instead of hiding it in button's tooltip
This commit is contained in:
parent
2bad75ab4a
commit
58cca5d018
4 changed files with 20 additions and 34 deletions
|
@ -261,7 +261,7 @@
|
|||
<sys:String x:Key="Text.Histories.Guide_1">1. Select single commit to view detail</sys:String>
|
||||
<sys:String x:Key="Text.Histories.Guide_2">2. Select two commits to show differences</sys:String>
|
||||
<sys:String x:Key="Text.Histories.Guide_3">3. Select more than 2 commits to count</sys:String>
|
||||
<sys:String x:Key="Text.Histories.Guide_4">4. Try to open context menu with selected commit</sys:String>
|
||||
<sys:String x:Key="Text.Histories.Guide_4">4. Open context menu to see more options</sys:String>
|
||||
|
||||
<sys:String x:Key="Text.Init">Initialize Repository</sys:String>
|
||||
<sys:String x:Key="Text.Init.Path">Path :</sys:String>
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
<sys:String x:Key="Text.Histories.SearchClear">清空</sys:String>
|
||||
<sys:String x:Key="Text.Histories.GraphMode">切换曲线/折线显示</sys:String>
|
||||
<sys:String x:Key="Text.Histories.DisplayMode">切换横向/纵向显示</sys:String>
|
||||
<sys:String x:Key="Text.Histories.Selected">已选中{0}项提交</sys:String>
|
||||
<sys:String x:Key="Text.Histories.Selected">已选中 {0} 项提交</sys:String>
|
||||
<sys:String x:Key="Text.Histories.Guide">操作说明</sys:String>
|
||||
<sys:String x:Key="Text.Histories.Guide_1">1. 单选时,显示选中提交的详细信息</sys:String>
|
||||
<sys:String x:Key="Text.Histories.Guide_2">2. 双选时,按选中顺序对比两个提交</sys:String>
|
||||
|
|
|
@ -174,12 +174,26 @@
|
|||
<Border x:Name="mask" Background="{StaticResource Brush.Window}">
|
||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Opacity=".25">
|
||||
<Path Width="128" Height="128" Data="{StaticResource Icon.Detail}"/>
|
||||
<TextBlock x:Name="txtCounter" Visibility="Hidden" FontFamily="Consolas" Margin="0,16,0,0" FontSize="24" FontWeight="UltraBold" HorizontalAlignment="Center"/>
|
||||
|
||||
<TextBlock
|
||||
x:Name="txtCounter"
|
||||
Margin="0,16"
|
||||
FontFamily="Consolas" FontSize="24" FontWeight="UltraBold"
|
||||
HorizontalAlignment="Center"
|
||||
TextOptions.TextFormattingMode="Ideal"
|
||||
Text="{StaticResource Text.Histories.Guide}"/>
|
||||
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" TextBlock.FontFamily="Consolas,Microsoft YaHei UI">
|
||||
<TextBlock Text="{StaticResource Text.Histories.Guide_1}" FontSize="14" Margin="0,2"/>
|
||||
<TextBlock Text="{StaticResource Text.Histories.Guide_2}" FontSize="14" Margin="0,2"/>
|
||||
<TextBlock Text="{StaticResource Text.Histories.Guide_3}" FontSize="14" Margin="0,2"/>
|
||||
<TextBlock Text="{StaticResource Text.Histories.Guide_4}" FontSize="14" Margin="0,2"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Right Top Button -->
|
||||
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,6,0,0" Orientation="Horizontal">
|
||||
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,6,8,0" Orientation="Horizontal">
|
||||
<ToggleButton
|
||||
Style="{StaticResource Style.ToggleButton.CommitGraphMode}"
|
||||
Foreground="{StaticResource Brush.FG2}"
|
||||
|
@ -196,26 +210,6 @@
|
|||
ToolTip="{StaticResource Text.Histories.DisplayMode}"
|
||||
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.MoveCommitInfoRight, Mode=TwoWay, Converter={StaticResource InverseBool}}"
|
||||
Checked="ChangeOrientation" Unchecked="ChangeOrientation"/>
|
||||
|
||||
<controls:IconButton
|
||||
Margin="8,0"
|
||||
Width="16" Height="16"
|
||||
ToolTip="{StaticResource Text.Histories.Guide}"
|
||||
Icon="{StaticResource Icon.Help}"
|
||||
Opacity=".4"
|
||||
Click="OpenGuide"/>
|
||||
|
||||
<Popup x:Name="popupGuide" IsOpen="False" StaysOpen="False" Placement="Bottom">
|
||||
<Border Background="{StaticResource Brush.Popup}" BorderThickness="1" BorderBrush="{StaticResource Brush.Border2}">
|
||||
<StackPanel Orientation="Vertical" TextElement.FontFamily="Consolas" Margin="8">
|
||||
<Label Content="{StaticResource Text.Histories.Guide}" FontWeight="Bold" FontSize="14" Margin="0,0,0,8"/>
|
||||
<Label Content="{StaticResource Text.Histories.Guide_1}"/>
|
||||
<Label Content="{StaticResource Text.Histories.Guide_2}"/>
|
||||
<Label Content="{StaticResource Text.Histories.Guide_3}"/>
|
||||
<Label Content="{StaticResource Text.Histories.Guide_4}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Popup>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
@ -238,11 +238,10 @@ namespace SourceGit.Views.Widgets {
|
|||
revisionCompare.Visibility = Visibility.Visible;
|
||||
} else if (selected.Count > 2) {
|
||||
mask.Visibility = Visibility.Visible;
|
||||
txtCounter.Visibility = Visibility.Visible;
|
||||
txtCounter.Text = App.Text("Histories.Selected", selected.Count);
|
||||
} else {
|
||||
mask.Visibility = Visibility.Visible;
|
||||
txtCounter.Visibility = Visibility.Hidden;
|
||||
txtCounter.Text = App.Text("Histories.Guide");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -594,12 +593,5 @@ namespace SourceGit.Views.Widgets {
|
|||
menu.Items.Add(submenu);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GUIDE
|
||||
private void OpenGuide(object sender, RoutedEventArgs e) {
|
||||
popupGuide.IsOpen = !popupGuide.IsOpen;
|
||||
e.Handled = true;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue