diff --git a/ShareX/Controls/TaskRoundedCornerPanel.cs b/ShareX/Controls/TaskRoundedCornerPanel.cs index 5020ab32f..85ba04547 100644 --- a/ShareX/Controls/TaskRoundedCornerPanel.cs +++ b/ShareX/Controls/TaskRoundedCornerPanel.cs @@ -33,6 +33,7 @@ namespace ShareX public class TaskRoundedCornerPanel : RoundedCornerPanel { public Color StatusColor { get; private set; } = Color.Transparent; + public ThumbnailTitleLocation StatusLocation { get; set; } public void UpdateStatusColor(TaskStatus status) { @@ -71,6 +72,17 @@ protected override void OnPaint(PaintEventArgs e) g.PixelOffsetMode = PixelOffsetMode.Half; + int y; + + if (StatusLocation == ThumbnailTitleLocation.Top) + { + y = 0; + } + else + { + y = ClientRectangle.Height; + } + using (LinearGradientBrush brush = new LinearGradientBrush(new Rectangle(0, 0, ClientRectangle.Width, 1), Color.Black, Color.Black, LinearGradientMode.Horizontal)) { @@ -81,7 +93,7 @@ protected override void OnPaint(PaintEventArgs e) using (Pen pen = new Pen(brush)) { - g.DrawLine(pen, new Point(0, 0), new Point(ClientRectangle.Width - 1, 0)); + g.DrawLine(pen, new Point(0, y), new Point(ClientRectangle.Width - 1, y)); } } } diff --git a/ShareX/Controls/TaskThumbnailPanel.cs b/ShareX/Controls/TaskThumbnailPanel.cs index 6439de8d0..97b0fcb2b 100644 --- a/ShareX/Controls/TaskThumbnailPanel.cs +++ b/ShareX/Controls/TaskThumbnailPanel.cs @@ -127,6 +127,7 @@ public ThumbnailTitleLocation TitleLocation if (titleLocation != value) { titleLocation = value; + pThumbnail.StatusLocation = value; UpdateLayout(); } }