From 10b0d7b2804529bdcb16a7a0835eb5f50a7cf2ea Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Thu, 15 Aug 2013 23:11:51 +0200 Subject: Fixing checkerboard background --- mapwidget.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapwidget.go b/mapwidget.go index 25c4cff..b3d8055 100644 --- a/mapwidget.go +++ b/mapwidget.go @@ -223,8 +223,8 @@ func (mw *MapWidget) drawBg() { drawable := mw.bg.GetDrawable() gc := gdk.NewGC(drawable) - w := (mw.w + 16) / 32 - h := (mw.h + 16) / 32 + w := int(math.Ceil(float64(mw.w) / 32)) + h := int(math.Ceil(float64(mw.h) / 32)) for y := 0; y < h; y++ { for x := 0; x < w; x++ { -- cgit v1.2.3-70-g09d2