8000 refactor: get graph clip width from grid column definition directly · sourcegit-scm/sourcegit@2c8370f · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c8370f

Browse files
committed
refactor: get graph clip width from grid column definition directly
Signed-off-by: leo <longshuang@msn.cn>
1 parent 008708f commit 2c8370f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Views/CommitGraph.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public override void Render(DrawingContext context)
5656
return;
5757

5858
// Calculate drawing area.
59-
var width = Bounds.Width - 273 - histories.AuthorNameColumnWidth.Value;
59+
var width = histories.CommitListHeader.ColumnDefinitions[0].ActualWidth;
6060
var height = Bounds.Height;
6161

6262
// Calculate row height

src/Views/Histories.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
Background="{DynamicResource Brush.Window}"
3131
BorderThickness="0,0,0,1"
3232
BorderBrush="{DynamicResource Brush.Border0}">
33-
<Grid>
33+
<Grid x:Name="CommitListHeader">
3434
<Grid.ColumnDefinitions>
3535
<ColumnDefinition Width="*"/>
3636
<ColumnDefinition Width="3"/>

0 commit comments

Comments
 (0)
0