Skip to content
This repository was archived by the owner on Oct 18, 2021. It is now read-only.

Commit 4a4530a

Browse files
committed
Fixed gradient bug
1 parent 8aeb033 commit 4a4530a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

SublimeOverlay/GradientPanel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public GradientPanel()
1414
}
1515
protected override void OnPaintBackground(PaintEventArgs e)
1616
{
17+
if (ClientRectangle.Width == 0 || ClientRectangle.Height == 0)
18+
return;
1719
using (var brush = new LinearGradientBrush(this.ClientRectangle,
1820
GradientFirstColor, GradientSecondColor, LinearGradientMode.Vertical))
1921
{

0 commit comments

Comments
 (0)