Skip to content

Commit

Permalink
Fix rip font picker
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensley committed Feb 26, 2023
1 parent 7c6529f commit d303554
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions Source/Pablo/Formats/Rip/Controls/FontStylePad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,21 @@ Control FontType()
Size = new Size(40, 40)
};

drawable.MouseUp += delegate
{
SelectFont();
};

drawable.Paint += delegate(object sender, PaintEventArgs pe)
{
if (canvas != null)
canvas.DrawRegion(pe.Graphics, new Rectangle(Point.Empty, canvas.WindowSize));
};
drawable.MouseUp += (sender, e) => SelectFont();

drawable.LoadComplete += delegate // Shown?
drawable.Paint += (sender, e) =>
{
if (drawable.Size.IsEmpty)
return;
canvas = new BGICanvas(drawable, drawable.Size);
DrawCanvas();
if (canvas == null || canvas.WindowSize != drawable.Size)
{
canvas = new BGICanvas(drawable, drawable.Size);
DrawCanvas();
}

canvas?.DrawRegion(e.Graphics, new Rectangle(Point.Empty, canvas.WindowSize));
};

return drawable;
}

Expand Down

0 comments on commit d303554

Please sign in to comment.