From 6a3c864f0a34f7c8e384f2019bdccf6e3db96353 Mon Sep 17 00:00:00 2001 From: Adam Schreiber Date: Sat, 09 May 2009 13:13:08 +0000 Subject: Fix centering of fractional area rect.x and rect.y are given in window based coordinates when getting the context's allocation. --- diff --git a/deci.py b/deci.py index 011bac9..245831c 100644 --- a/deci.py +++ b/deci.py @@ -45,8 +45,8 @@ class DrawFractionalArea(gtk.DrawingArea): width = min(rect.width, rect.height) - 10 - x = int(rect.x + round((rect.width - width)/2)) - y = int(rect.y + round((rect.height - width)/2)) + x = int(round((rect.width - width)/2)) + y = int(round((rect.height - width)/2)) context.rectangle(gtk.gdk.Rectangle(x, y, -- cgit v0.9.1