feature: add tooltip for commit time that shows how much time it is from now (#259)

* this tooltip does NOT update until it's owner row recreated or the DataContext of that row changed. You can scroll it out of bounds to force refresh the tooltip
This commit is contained in:
leo 2024-07-15 16:49:16 +08:00
parent 684fedb9bd
commit dc407b6033
No known key found for this signature in database
2 changed files with 48 additions and 5 deletions

View file

@ -160,11 +160,13 @@
<DataGridTemplateColumn.CellTemplate>
<DataTemplate x:DataType="{x:Type m:Commit}">
<TextBlock Classes="monospace"
Text="{Binding CommitterTimeStr}"
Margin="8,0"
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.HalfIfFalse}}"
FontWeight="{Binding IsCurrentHead, Converter={x:Static c:BoolConverters.BoldIfTrue}}"/>
<Border Background="Transparent" ToolTip.Tip="{Binding CommitterTimeFromNowString}">
<TextBlock Classes="monospace"
Text="{Binding CommitterTimeStr}"
Margin="8,0"
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.HalfIfFalse}}"
FontWeight="{Binding IsCurrentHead, Converter={x:Static c:BoolConverters.BoldIfTrue}}"/>
</Border>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>