Ensure that resources gauge is not drawn with a width of 0 to make GTK happy

This commit is contained in:
blitzmann
2015-06-27 15:35:22 -04:00
parent 975a414c5f
commit 5b0857e169
2 changed files with 40 additions and 34 deletions

View File

@@ -33,9 +33,10 @@ def DrawFilledBitmap(width, height, color):
return canvas
def DrawGradientBar(width, height, gStart, gEnd, gMid = None, fillRatio = 4):
# we need to have dimensions to draw
assert width > 0 and height > 0
canvas = wx.EmptyBitmap(width,height)
mdc = wx.MemoryDC()
mdc.SelectObject(canvas)