Skip to content

Commit fe316b2

Browse files
fixed some tweeks in suduko-chb for OS-X
1 parent e4dd158 commit fe316b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sudoku-chb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def test_PuzzleGrid():
146146
class Grid:
147147
def __init__(self, w, h):
148148
size = min(w,h)
149-
self.d = d = (size - 20) / 9
149+
self.d = d = max( 2, (size - 20) / 9 )# make sure we don't get zero...
150150
self.x0 = (w - (self.d * 9)) / 2
151151
self.y0 = (h - (self.d * 9)) / 2
152152
self.font_size = int(11 * d/16.0)
@@ -212,7 +212,7 @@ def Draw(self, dc):
212212
# draw the background:
213213
dc.SetBackground(wx.Brush(self.GetBackgroundColour()))
214214
dc.Clear()
215-
dc.SetBrush(wx.Brush(wx.Color(128,128,255)))
215+
dc.SetBrush(wx.Brush(wx.Colour(128,128,255)))
216216
dc.SetPen(wx.TRANSPARENT_PEN)
217217
dc.DrawRectangle(x0, y0, d*9, d*9 )
218218

0 commit comments

Comments
 (0)