feat: swap placement.

This commit is contained in:
rabbitism
2024-01-08 23:19:10 +08:00
parent e1e04f7c8f
commit 22b5dafb8e
3 changed files with 29 additions and 23 deletions

View File

@@ -8,6 +8,12 @@ public enum TimelineDisplayMode
Alternate,
}
/// <summary>
/// Placement of timeline.
/// Left means line is placed left to TimelineItem content.
/// Right means line is placed right to TimelineItem content.
/// Separate means line is placed between TimelineItem content and time.
/// </summary>
public enum TimelineItemDisplayMode
{
Left,

View File

@@ -169,12 +169,12 @@ public class TimelineItem: HeaderedContentControl
if (Mode == TimelineItemDisplayMode.Left)
{
max = Math.Max(max, time);
return (max, icon, 0);
return (0, icon, max);
}
if (Mode == TimelineItemDisplayMode.Right)
{
max = Math.Max(max, time);
return (0, icon, max);
return (max , icon, 0);
}
if (Mode == TimelineItemDisplayMode.Separate)
{